From a7d685da8e8682dc68b6f35174d9bd59c3a76783 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 24 Jul 2024 13:31:33 -0700 Subject: [PATCH 1/3] Define Alpine helix images using multi-platform dockerfiles Follows the pattern used by the ubuntu 24.04 helix dockerfile --- src/alpine/3.17/helix/{amd64 => }/Dockerfile | 15 ++-- src/alpine/3.17/helix/arm32v7/Dockerfile | 95 -------------------- src/alpine/3.17/helix/arm64v8/Dockerfile | 90 ------------------- src/alpine/3.18/helix/{amd64 => }/Dockerfile | 16 ++-- src/alpine/3.18/helix/arm32v7/Dockerfile | 90 ------------------- src/alpine/3.18/helix/arm64v8/Dockerfile | 91 ------------------- src/alpine/3.20/helix/{amd64 => }/Dockerfile | 16 ++-- src/alpine/3.20/helix/arm32v7/Dockerfile | 94 ------------------- src/alpine/3.20/helix/arm64v8/Dockerfile | 93 ------------------- src/alpine/manifest.json | 21 +++-- 10 files changed, 37 insertions(+), 584 deletions(-) rename src/alpine/3.17/helix/{amd64 => }/Dockerfile (85%) delete mode 100644 src/alpine/3.17/helix/arm32v7/Dockerfile delete mode 100644 src/alpine/3.17/helix/arm64v8/Dockerfile rename src/alpine/3.18/helix/{amd64 => }/Dockerfile (85%) delete mode 100644 src/alpine/3.18/helix/arm32v7/Dockerfile delete mode 100644 src/alpine/3.18/helix/arm64v8/Dockerfile rename src/alpine/3.20/helix/{amd64 => }/Dockerfile (85%) delete mode 100644 src/alpine/3.20/helix/arm32v7/Dockerfile delete mode 100644 src/alpine/3.20/helix/arm64v8/Dockerfile diff --git a/src/alpine/3.17/helix/amd64/Dockerfile b/src/alpine/3.17/helix/Dockerfile similarity index 85% rename from src/alpine/3.17/helix/amd64/Dockerfile rename to src/alpine/3.17/helix/Dockerfile index 9b4d560fb..448fc7334 100644 --- a/src/alpine/3.17/helix/amd64/Dockerfile +++ b/src/alpine/3.17/helix/Dockerfile @@ -1,4 +1,5 @@ -FROM amd64/alpine:3.17 AS msquic +FROM alpine:3.17 AS msquic +ARG TARGETARCH # build MsQuic as we don't have packages RUN apk add --upgrade --no-cache \ @@ -18,19 +19,19 @@ RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://gith WORKDIR /tmp/msquic -RUN cmake -B build/linux/x64_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl3 \ +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/x64_Release_openssl3 --config Release && \ - cmake --install build/linux/x64_Release_openssl3 --prefix /msquic + cmake --build build/linux/Release_openssl3 --config Release && \ + cmake --install build/linux/Release_openssl3 --prefix /msquic -FROM amd64/alpine:3.17 AS venv +FROM alpine:3.17 AS venv RUN apk add --upgrade --no-cache \ cargo \ @@ -44,7 +45,7 @@ RUN python3 -m venv /venv && \ 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 amd64/alpine:3.17 +FROM alpine:3.17 # Install .NET and test dependencies RUN apk add --upgrade --no-cache \ diff --git a/src/alpine/3.17/helix/arm32v7/Dockerfile b/src/alpine/3.17/helix/arm32v7/Dockerfile deleted file mode 100644 index d8ef681d7..000000000 --- a/src/alpine/3.17/helix/arm32v7/Dockerfile +++ /dev/null @@ -1,95 +0,0 @@ -FROM arm32v7/alpine:3.17 as msquic - -# build MsQuic as we don't have packages -RUN apk add --upgrade --no-cache \ - cmake \ - g++ \ - gcc \ - git \ - numactl-dev \ - linux-headers \ - lttng-ust-dev \ - make \ - musl-dev \ - openssl-dev \ - perl - -RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://github.com/microsoft/msquic /tmp/msquic - -WORKDIR /tmp/msquic - -RUN cmake -B build/linux/arm_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm_Release_openssl3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TARGET_ARCHITECTURE=arm \ - -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/arm_Release_openssl3 --config Release && \ - cmake --install build/linux/arm_Release_openssl3 --prefix /msquic - -FROM arm32v7/alpine:3.17 as venv - -RUN apk add --upgrade --no-cache \ - libffi-dev \ - linux-headers \ - python3-dev \ - openssl-dev - -RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.18/main" >> /etc/apk/repositories && \ - echo "https://dl-cdn.alpinelinux.org/alpine/v3.18/community" >> /etc/apk/repositories && \ - apk update && \ - apk add --no-cache \ - cargo - -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 arm32v7/alpine:3.17 - -# Install .NET and test dependencies -RUN apk add --upgrade --no-cache \ - bash \ - coreutils \ - curl \ - icu-data-full \ - icu-libs \ - iputils \ - krb5-libs \ - lldb \ - llvm \ - lttng-ust \ - musl-locales \ - numactl \ - openssl \ - python3 \ - py3-pip \ - sudo \ - tzdata - -# Copy msquic from the msquic image into our image that will run on Helix -COPY --from=msquic /msquic /usr - -# Needed for runtime tests to pass -ENV LANG=en-US.UTF-8 -RUN echo export LANG=${LANG} >> /etc/profile.d/locale.sh - -# create helixbot user and give rights to sudo without password -# Alpine does not support long options -RUN /usr/sbin/adduser -D -g '' -G adm -s /bin/bash -u 1000 helixbot && \ - chmod 755 /root && \ - echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot - -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 diff --git a/src/alpine/3.17/helix/arm64v8/Dockerfile b/src/alpine/3.17/helix/arm64v8/Dockerfile deleted file mode 100644 index f382b5eae..000000000 --- a/src/alpine/3.17/helix/arm64v8/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -FROM arm64v8/alpine:3.17 as msquic - -# build MsQuic as we don't have packages -RUN apk add --upgrade --no-cache \ - cmake \ - g++ \ - gcc \ - git \ - numactl-dev \ - linux-headers \ - lttng-ust-dev \ - make \ - musl-dev \ - openssl-dev \ - perl - -RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://github.com/microsoft/msquic /tmp/msquic - -WORKDIR /tmp/msquic - -RUN cmake -B build/linux/arm64_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm64_Release_openssl3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TARGET_ARCHITECTURE=arm64 \ - -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/arm64_Release_openssl3 --config Release && \ - cmake --install build/linux/arm64_Release_openssl3 --prefix /msquic - -FROM arm64v8/alpine:3.17 as venv - -RUN apk add --upgrade --no-cache \ - cargo \ - libffi-dev \ - linux-headers \ - python3-dev \ - openssl-dev - -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 arm64v8/alpine:3.17 - -# Install .NET and test dependencies -RUN apk add --upgrade --no-cache \ - bash \ - coreutils \ - curl \ - icu-data-full \ - icu-libs \ - iputils \ - krb5-libs \ - lldb \ - llvm \ - lttng-ust \ - musl-locales \ - numactl \ - openssl \ - python3 \ - py3-pip \ - sudo \ - tzdata - -# Copy msquic from the msquic image into our image that will run on Helix -COPY --from=msquic /msquic /usr - -# Needed for runtime tests to pass -ENV LANG=en-US.UTF-8 -RUN echo export LANG=${LANG} >> /etc/profile.d/locale.sh - -# create helixbot user and give rights to sudo without password -# Alpine does not support long options -RUN /usr/sbin/adduser -D -g '' -G adm -s /bin/bash -u 1000 helixbot && \ - chmod 755 /root && \ - echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot - -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 diff --git a/src/alpine/3.18/helix/amd64/Dockerfile b/src/alpine/3.18/helix/Dockerfile similarity index 85% rename from src/alpine/3.18/helix/amd64/Dockerfile rename to src/alpine/3.18/helix/Dockerfile index 5ba658f49..180e045fd 100644 --- a/src/alpine/3.18/helix/amd64/Dockerfile +++ b/src/alpine/3.18/helix/Dockerfile @@ -1,4 +1,5 @@ -FROM amd64/alpine:3.18 as msquic +FROM alpine:3.18 AS msquic +ARG TARGETARCH # build MsQuic as we don't have packages RUN apk add --upgrade --no-cache \ @@ -18,19 +19,19 @@ RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://gith WORKDIR /tmp/msquic -RUN cmake -B build/linux/x64_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl3 \ +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/x64_Release_openssl3 --config Release && \ - cmake --install build/linux/x64_Release_openssl3 --prefix /msquic + cmake --build build/linux/Release_openssl3 --config Release && \ + cmake --install build/linux/Release_openssl3 --prefix /msquic -FROM amd64/alpine:3.18 AS venv +FROM alpine:3.18 AS venv RUN apk add --upgrade --no-cache \ cargo \ @@ -44,8 +45,7 @@ RUN python3 -m venv /venv && \ 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 amd64/alpine:3.18 +FROM alpine:3.18 # Install .NET and test dependencies RUN apk add --upgrade --no-cache \ diff --git a/src/alpine/3.18/helix/arm32v7/Dockerfile b/src/alpine/3.18/helix/arm32v7/Dockerfile deleted file mode 100644 index 01b58c89e..000000000 --- a/src/alpine/3.18/helix/arm32v7/Dockerfile +++ /dev/null @@ -1,90 +0,0 @@ -FROM arm32v7/alpine:3.18 as msquic - -# build MsQuic as we don't have packages -RUN apk add --upgrade --no-cache \ - cmake \ - g++ \ - gcc \ - git \ - numactl-dev \ - linux-headers \ - lttng-ust-dev \ - make \ - musl-dev \ - openssl-dev \ - perl - -RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://github.com/microsoft/msquic /tmp/msquic - -WORKDIR /tmp/msquic - -RUN cmake -B build/linux/arm_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm_Release_openssl3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TARGET_ARCHITECTURE=arm \ - -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/arm_Release_openssl3 --config Release && \ - cmake --install build/linux/arm_Release_openssl3 --prefix /msquic - -FROM arm32v7/alpine:3.18 as venv - -RUN apk add --upgrade --no-cache \ - cargo \ - libffi-dev \ - linux-headers \ - python3-dev \ - openssl-dev - -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 arm32v7/alpine:3.18 - -# Install .NET and test dependencies -RUN apk add --upgrade --no-cache \ - bash \ - coreutils \ - curl \ - icu-data-full \ - icu-libs \ - iputils \ - krb5-libs \ - lldb \ - llvm \ - lttng-ust \ - musl-locales \ - numactl \ - openssl \ - python3 \ - py3-pip \ - sudo \ - tzdata - -# Copy msquic from the msquic image into our image that will run on Helix -COPY --from=msquic /msquic /usr - -# Needed for runtime tests to pass -ENV LANG=en-US.UTF-8 -RUN echo export LANG=${LANG} >> /etc/profile.d/locale.sh - -# create helixbot user and give rights to sudo without password -# Alpine does not support long options -RUN /usr/sbin/adduser -D -g '' -G adm -s /bin/bash -u 1000 helixbot && \ - chmod 755 /root && \ - echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot - -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 diff --git a/src/alpine/3.18/helix/arm64v8/Dockerfile b/src/alpine/3.18/helix/arm64v8/Dockerfile deleted file mode 100644 index f6e836aef..000000000 --- a/src/alpine/3.18/helix/arm64v8/Dockerfile +++ /dev/null @@ -1,91 +0,0 @@ -FROM arm64v8/alpine:3.18 as msquic - -# build MsQuic as we don't have packages -RUN apk add --upgrade --no-cache \ - cmake \ - g++ \ - gcc \ - git \ - numactl-dev \ - linux-headers \ - lttng-ust-dev \ - make \ - musl-dev \ - openssl-dev \ - perl - -RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://github.com/microsoft/msquic /tmp/msquic - -WORKDIR /tmp/msquic - -RUN cmake -B build/linux/arm64_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm64_Release_openssl3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TARGET_ARCHITECTURE=arm64 \ - -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/arm64_Release_openssl3 --config Release && \ - cmake --install build/linux/arm64_Release_openssl3 --prefix /msquic - -FROM arm64v8/alpine:3.18 as venv - -RUN apk add --upgrade --no-cache \ - cargo \ - libffi-dev \ - linux-headers \ - python3-dev \ - openssl-dev - -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 arm64v8/alpine:3.18 - -# Install .NET and test dependencies -RUN apk add --upgrade --no-cache \ - bash \ - coreutils \ - curl \ - icu-data-full \ - icu-libs \ - iputils \ - krb5-libs \ - lldb \ - llvm \ - lttng-ust \ - musl-locales \ - numactl \ - openssl \ - python3 \ - py3-pip \ - sudo \ - tzdata - -# Copy msquic from the msquic image into our image that will run on Helix -COPY --from=msquic /msquic /usr - -# Needed for runtime tests to pass -ENV LANG=en-US.UTF-8 -RUN echo export LANG=${LANG} >> /etc/profile.d/locale.sh - -# create helixbot user and give rights to sudo without password -# Alpine does not support long options -RUN /usr/sbin/adduser -D -g '' -G adm -s /bin/bash -u 1000 helixbot && \ - chmod 755 /root && \ - echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot - -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 diff --git a/src/alpine/3.20/helix/amd64/Dockerfile b/src/alpine/3.20/helix/Dockerfile similarity index 85% rename from src/alpine/3.20/helix/amd64/Dockerfile rename to src/alpine/3.20/helix/Dockerfile index ffd592651..393749e8b 100644 --- a/src/alpine/3.20/helix/amd64/Dockerfile +++ b/src/alpine/3.20/helix/Dockerfile @@ -1,4 +1,5 @@ -FROM amd64/alpine:3.20 AS msquic +FROM alpine:3.20 AS msquic +ARG TARGETARCH # build MsQuic as we don't have packages RUN apk add --upgrade --no-cache \ @@ -18,21 +19,22 @@ RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://gith WORKDIR /tmp/msquic -RUN cmake -B build/linux/x64_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/x64_Release_openssl3 \ +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/x64_Release_openssl3 --config Release && \ - cmake --install build/linux/x64_Release_openssl3 --prefix /msquic + cmake --build build/linux/Release_openssl3 --config Release && \ + cmake --install build/linux/Release_openssl3 --prefix /msquic -FROM amd64/alpine:3.20 AS venv +FROM alpine:3.20 AS venv RUN apk add --upgrade --no-cache \ + cargo \ python3-dev \ build-base \ libffi-dev \ @@ -44,7 +46,7 @@ RUN python3 -m venv /venv && \ 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 amd64/alpine:3.20 +FROM alpine:3.20 # Install .NET and test dependencies RUN apk add --upgrade --no-cache \ diff --git a/src/alpine/3.20/helix/arm32v7/Dockerfile b/src/alpine/3.20/helix/arm32v7/Dockerfile deleted file mode 100644 index ba6da15cb..000000000 --- a/src/alpine/3.20/helix/arm32v7/Dockerfile +++ /dev/null @@ -1,94 +0,0 @@ -FROM arm32v7/alpine:3.20 AS msquic - -# build MsQuic as we don't have packages -RUN apk add --upgrade --no-cache \ - cmake \ - g++ \ - gcc \ - git \ - numactl-dev \ - linux-headers \ - lttng-ust-dev \ - make \ - musl-dev \ - openssl-dev \ - perl - -RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://github.com/microsoft/msquic /tmp/msquic - -WORKDIR /tmp/msquic - -RUN cmake -B build/linux/arm_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm_Release_openssl3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TARGET_ARCHITECTURE=arm \ - -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/arm_Release_openssl3 --config Release && \ - cmake --install build/linux/arm_Release_openssl3 --prefix /msquic - -FROM arm32v7/alpine:3.20 AS venv - -RUN apk add --upgrade --no-cache \ - cargo \ - python3-dev \ - build-base \ - libffi-dev \ - gcc \ - openssl-dev \ - linux-headers - -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 arm32v7/alpine:3.20 - -# Install .NET and test dependencies -RUN apk add --upgrade --no-cache \ - bash \ - coreutils \ - curl \ - icu-data-full \ - icu-libs \ - iputils \ - krb5-libs \ - lldb \ - llvm \ - lttng-ust \ - musl-locales \ - numactl \ - openssl \ - python3 \ - python3-dev \ - py3-cryptography \ - py3-pip \ - sudo \ - tzdata - -# create helixbot user and give rights to sudo without password -# Alpine does not support long options -RUN /usr/sbin/adduser -D -g '' -G adm -s /bin/bash -u 1000 helixbot && \ - chmod 755 /root && \ - echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot - -# Copy msquic from the msquic image into our image that will run on Helix -COPY --from=msquic /msquic /usr - -# Needed for runtime tests to pass -ENV LANG=en-US.UTF-8 -RUN echo export LANG=${LANG} >> /etc/profile.d/locale.sh - -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 diff --git a/src/alpine/3.20/helix/arm64v8/Dockerfile b/src/alpine/3.20/helix/arm64v8/Dockerfile deleted file mode 100644 index d06626768..000000000 --- a/src/alpine/3.20/helix/arm64v8/Dockerfile +++ /dev/null @@ -1,93 +0,0 @@ -FROM arm64v8/alpine:3.20 AS msquic - -# build MsQuic as we don't have packages -RUN apk add --upgrade --no-cache \ - cmake \ - g++ \ - gcc \ - git \ - numactl-dev \ - linux-headers \ - lttng-ust-dev \ - make \ - musl-dev \ - openssl-dev \ - perl - -RUN git clone --depth 1 --single-branch --branch v2.3.6 --recursive https://github.com/microsoft/msquic /tmp/msquic - -WORKDIR /tmp/msquic - -RUN cmake -B build/linux/arm64_Release_openssl3 \ - -DQUIC_OUTPUT_DIR=/tmp/msquic/artifacts/bin/linux/arm64_Release_openssl3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TARGET_ARCHITECTURE=arm64 \ - -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/arm64_Release_openssl3 --config Release && \ - cmake --install build/linux/arm64_Release_openssl3 --prefix /msquic - -FROM arm64v8/alpine:3.20 AS venv - -RUN apk add --upgrade --no-cache \ - python3-dev \ - build-base \ - libffi-dev \ - gcc \ - libffi-dev \ - linux-headers - -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 arm64v8/alpine:3.20 - -# Install .NET and test dependencies -RUN apk add --upgrade --no-cache \ - bash \ - coreutils \ - curl \ - icu-data-full \ - icu-libs \ - iputils \ - krb5-libs \ - lldb \ - llvm \ - lttng-ust \ - musl-locales \ - numactl \ - openssl \ - python3 \ - python3-dev \ - py3-pip \ - sudo \ - tzdata - -# Copy msquic from the msquic image into our image that will run on Helix -COPY --from=msquic /msquic /usr - -# Needed for runtime tests to pass -ENV LANG=en-US.UTF-8 -RUN echo export LANG=${LANG} >> /etc/profile.d/locale.sh - -# create helixbot user and give rights to sudo without password -# Alpine does not support long options -RUN /usr/sbin/adduser -D -g '' -G adm -s /bin/bash -u 1000 helixbot && \ - chmod 755 /root && \ - echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot - -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 diff --git a/src/alpine/manifest.json b/src/alpine/manifest.json index c2b0fb07a..83afe4f23 100644 --- a/src/alpine/manifest.json +++ b/src/alpine/manifest.json @@ -22,7 +22,8 @@ { "platforms": [ { - "dockerfile": "src/alpine/3.17/helix/amd64", + "architecture": "amd64", + "dockerfile": "src/alpine/3.17/helix", "os": "linux", "osVersion": "alpine3.17", "tags": { @@ -36,7 +37,7 @@ "platforms": [ { "architecture": "arm", - "dockerfile": "src/alpine/3.17/helix/arm32v7", + "dockerfile": "src/alpine/3.17/helix", "os": "linux", "osVersion": "alpine3.17", "tags": { @@ -51,7 +52,7 @@ "platforms": [ { "architecture": "arm64", - "dockerfile": "src/alpine/3.17/helix/arm64v8", + "dockerfile": "src/alpine/3.17/helix", "os": "linux", "osVersion": "alpine3.17", "tags": { @@ -65,7 +66,8 @@ { "platforms": [ { - "dockerfile": "src/alpine/3.18/helix/amd64", + "architecture": "amd64", + "dockerfile": "src/alpine/3.18/helix", "os": "linux", "osVersion": "alpine3.18", "tags": { @@ -79,7 +81,7 @@ "platforms": [ { "architecture": "arm", - "dockerfile": "src/alpine/3.18/helix/arm32v7", + "dockerfile": "src/alpine/3.18/helix", "os": "linux", "osVersion": "alpine3.18", "tags": { @@ -94,7 +96,7 @@ "platforms": [ { "architecture": "arm64", - "dockerfile": "src/alpine/3.18/helix/arm64v8", + "dockerfile": "src/alpine/3.18/helix", "os": "linux", "osVersion": "alpine3.18", "tags": { @@ -166,7 +168,8 @@ { "platforms": [ { - "dockerfile": "src/alpine/3.20/helix/amd64", + "architecture": "amd64", + "dockerfile": "src/alpine/3.20/helix", "os": "linux", "osVersion": "alpine3.20", "tags": { @@ -180,7 +183,7 @@ "platforms": [ { "architecture": "arm", - "dockerfile": "src/alpine/3.20/helix/arm32v7", + "dockerfile": "src/alpine/3.20/helix", "os": "linux", "osVersion": "alpine3.20", "tags": { @@ -195,7 +198,7 @@ "platforms": [ { "architecture": "arm64", - "dockerfile": "src/alpine/3.20/helix/arm64v8", + "dockerfile": "src/alpine/3.20/helix", "os": "linux", "osVersion": "alpine3.20", "tags": { From 1711f8c66be6beff13d2953a00ec2715b9bc12c6 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 24 Jul 2024 13:49:03 -0700 Subject: [PATCH 2/3] Add library repo name --- src/alpine/3.17/helix/Dockerfile | 6 +++--- src/alpine/3.18/helix/Dockerfile | 6 +++--- src/alpine/3.20/helix/Dockerfile | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/alpine/3.17/helix/Dockerfile b/src/alpine/3.17/helix/Dockerfile index 448fc7334..b533b8a69 100644 --- a/src/alpine/3.17/helix/Dockerfile +++ b/src/alpine/3.17/helix/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.17 AS msquic +FROM library/alpine:3.17 AS msquic ARG TARGETARCH # build MsQuic as we don't have packages @@ -31,7 +31,7 @@ RUN cmake -B build/linux/Release_openssl3 \ cmake --build build/linux/Release_openssl3 --config Release && \ cmake --install build/linux/Release_openssl3 --prefix /msquic -FROM alpine:3.17 AS venv +FROM library/alpine:3.17 AS venv RUN apk add --upgrade --no-cache \ cargo \ @@ -45,7 +45,7 @@ RUN python3 -m venv /venv && \ 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 alpine:3.17 +FROM library/alpine:3.17 # Install .NET and test dependencies RUN apk add --upgrade --no-cache \ diff --git a/src/alpine/3.18/helix/Dockerfile b/src/alpine/3.18/helix/Dockerfile index 180e045fd..c27af6c9b 100644 --- a/src/alpine/3.18/helix/Dockerfile +++ b/src/alpine/3.18/helix/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 AS msquic +FROM library/alpine:3.18 AS msquic ARG TARGETARCH # build MsQuic as we don't have packages @@ -31,7 +31,7 @@ RUN cmake -B build/linux/Release_openssl3 \ cmake --build build/linux/Release_openssl3 --config Release && \ cmake --install build/linux/Release_openssl3 --prefix /msquic -FROM alpine:3.18 AS venv +FROM library/alpine:3.18 AS venv RUN apk add --upgrade --no-cache \ cargo \ @@ -45,7 +45,7 @@ RUN python3 -m venv /venv && \ 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 alpine:3.18 +FROM library/alpine:3.18 # Install .NET and test dependencies RUN apk add --upgrade --no-cache \ diff --git a/src/alpine/3.20/helix/Dockerfile b/src/alpine/3.20/helix/Dockerfile index 393749e8b..39cc44cf7 100644 --- a/src/alpine/3.20/helix/Dockerfile +++ b/src/alpine/3.20/helix/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.20 AS msquic +FROM library/alpine:3.20 AS msquic ARG TARGETARCH # build MsQuic as we don't have packages @@ -31,7 +31,7 @@ RUN cmake -B build/linux/Release_openssl3 \ cmake --build build/linux/Release_openssl3 --config Release && \ cmake --install build/linux/Release_openssl3 --prefix /msquic -FROM alpine:3.20 AS venv +FROM library/alpine:3.20 AS venv RUN apk add --upgrade --no-cache \ cargo \ @@ -46,7 +46,7 @@ RUN python3 -m venv /venv && \ 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 alpine:3.20 +FROM library/alpine:3.20 # Install .NET and test dependencies RUN apk add --upgrade --no-cache \ From 3abeaf273c98a44fbf4fbf7428c8c8fcc73cfc0c Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 24 Jul 2024 14:49:23 -0700 Subject: [PATCH 3/3] Fix dependencies --- src/alpine/3.17/helix/Dockerfile | 7 ++++++- src/alpine/3.20/helix/Dockerfile | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/alpine/3.17/helix/Dockerfile b/src/alpine/3.17/helix/Dockerfile index b533b8a69..ed9a77602 100644 --- a/src/alpine/3.17/helix/Dockerfile +++ b/src/alpine/3.17/helix/Dockerfile @@ -34,12 +34,17 @@ RUN cmake -B build/linux/Release_openssl3 \ FROM library/alpine:3.17 AS venv RUN apk add --upgrade --no-cache \ - cargo \ libffi-dev \ linux-headers \ python3-dev \ openssl-dev +RUN echo "https://dl-cdn.alpinelinux.org/alpine/v3.18/main" >> /etc/apk/repositories && \ + echo "https://dl-cdn.alpinelinux.org/alpine/v3.18/community" >> /etc/apk/repositories && \ + apk update && \ + apk add --no-cache \ + cargo + 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 && \ diff --git a/src/alpine/3.20/helix/Dockerfile b/src/alpine/3.20/helix/Dockerfile index 39cc44cf7..524d55670 100644 --- a/src/alpine/3.20/helix/Dockerfile +++ b/src/alpine/3.20/helix/Dockerfile @@ -38,6 +38,7 @@ RUN apk add --upgrade --no-cache \ python3-dev \ build-base \ libffi-dev \ + openssl-dev \ gcc \ linux-headers