Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 62 additions & 11 deletions src/azurelinux/3.0/helix/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,76 @@
FROM mcr.microsoft.com/azurelinux/base/core:3.0

# Install Helix Dependencies
FROM mcr.microsoft.com/azurelinux/base/core:3.0 as msquic
ARG TARGETARCH

ENV LANG=en_US.utf8

RUN tdnf install --setopt tsflags=nodocs --refresh -y \
# build MsQuic as we don't have packages
RUN tdnf install --refresh -y \
binutils \
build-essential \
ca-certificates-microsoft \
cmake \
gcc-c++ \
gcc \
git \
libnuma-devel \
kernel-headers \
lttng-ust-devel \
make \
openssl-devel \
perl

RUN git clone --depth 1 --single-branch --branch v2.4.1 --recursive https://github.com/microsoft/msquic /tmp/msquic

WORKDIR /tmp/msquic

RUN cmake -B build/linux/Release_openssl3 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TARGET_ARCHITECTURE=${TARGETARCH} \
-DQUIC_TLS=openssl3 \
-DQUIC_ENABLE_LOGGING=true \
-DQUIC_USE_SYSTEM_LIBCRYPTO=true \
-DQUIC_BUILD_TOOLS=off \
-DQUIC_BUILD_TEST=off \
-DQUIC_BUILD_PERF=off && \
cmake --build build/linux/Release_openssl3 --config Release && \
cmake --install build/linux/Release_openssl3 --prefix /msquic

FROM mcr.microsoft.com/azurelinux/base/core:3.0 as venv

RUN tdnf install --refresh -y \
build-essential \
ca-certificates-microsoft \
gcc \
iputils \
python3 \
python3-devel \
python3-pip

RUN python3 -m venv /venv && \
source /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 mcr.microsoft.com/azurelinux/base/core:3.0

# Install .NET and test dependencies
RUN tdnf install --setopt tsflags=nodocs --refresh -y \
ca-certificates-microsoft \
icu \
iputils \
llvm \
python3-devel \
python3 \
python3-pip \
shadow-utils \
tar \
tzdata \
which \
&& tdnf clean all

RUN ln -sf /usr/bin/python3 /usr/bin/python && \
python -m pip install --upgrade setuptools && \
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 && \
rm ./helix_scripts-*-py3-none-any.whl

# Copy msquic from the msquic image into our image that will run on Helix
COPY --from=msquic /msquic /usr

# create helixbot user and give rights to sudo without password
RUN /usr/sbin/useradd -c '' --uid 1000 --shell /bin/bash --groups adm helixbot && \
Expand All @@ -33,4 +80,8 @@ RUN /usr/sbin/useradd -c '' --uid 1000 --shell /bin/bash --groups adm helixbot &

USER helixbot

RUN python -m venv /home/helixbot/.vsts-env
# 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