Skip to content

Commit

Permalink
Add Debian trixie image (#1288)
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Thalman <[email protected]>
  • Loading branch information
richlander and mthalman authored Dec 11, 2024
1 parent 45ddc5a commit 5464674
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 0 deletions.
87 changes: 87 additions & 0 deletions src/debian/13/helix/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
FROM library/debian:trixie AS venv

RUN apt-get update \
&& apt-get install -y \
cargo \
coreutils \
libffi-dev \
libssl-dev \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m venv /venv \
&& . /venv/bin/activate \
&& pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple \
&& pip install ./helix_scripts-*-py3-none-any.whl

FROM library/debian:trixie
ARG TARGETARCH

# Install Helix Dependencies
RUN LIBCURL=libcurl4 \
&& if [ "$TARGETARCH" = "arm" ]; then \
LIBCURL="libcurl4t64"; fi \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
apt-transport-https \
curl \
autoconf \
automake \
at \
build-essential \
gcc \
gdb \
git \
iputils-ping \
$LIBCURL \
libffi-dev \
libicu-dev \
libssl-dev \
libtool \
libunwind8 \
lldb \
llvm \
locales \
locales-all \
python3-dev \
python3-pip \
python3-venv \
sudo \
tzdata \
unzip \
# libmsquic dependencies
libbpf1 \
libelf1t64 \
libnl-3-200 \
libnl-route-3-200 \
libnuma1 \
libxdp1 \
&& rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

RUN ARCH=$TARGETARCH \
&& if [ "$TARGETARCH" = "arm" ]; then \
ARCH="armhf"; fi \
&& curl -LO https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/libm/libmsquic/libmsquic_2.4.7_$ARCH.deb \
&& dpkg -i libmsquic* \
&& rm libmsquic*

ENV LANG=en_US.utf8

# Create helixbot user and give rights to sudo without password
# additionally, preinstall the virtualenv packages used for VSTS reporting to save time
RUN /usr/sbin/adduser --disabled-password --gecos '' --uid 1000 --shell /bin/bash --ingroup adm helixbot \
&& chmod 755 /root \
&& echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers

USER helixbot

# Install Helix Dependencies
ENV VIRTUAL_ENV=/home/helixbot/.vsts-env
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY --from=venv /venv $VIRTUAL_ENV
41 changes: 41 additions & 0 deletions src/debian/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,47 @@
}
}
]
},
{
"platforms": [
{
"architecture": "amd64",
"dockerfile": "src/debian/13/helix/",
"os": "linux",
"osVersion": "trixie",
"tags": {
"debian-13-helix-amd64": {}
}
}
]
},
{
"platforms": [
{
"architecture": "arm64",
"dockerfile": "src/debian/13/helix/",
"os": "linux",
"osVersion": "trixie",
"tags": {
"debian-13-helix-arm64v8": {}
},
"variant": "v8"
}
]
},
{
"platforms": [
{
"architecture": "arm",
"dockerfile": "src/debian/13/helix/",
"os": "linux",
"osVersion": "trixie",
"tags": {
"debian-13-helix-arm32v7": {}
},
"variant": "v7"
}
]
}
]
}
Expand Down

0 comments on commit 5464674

Please sign in to comment.