From d7217cd978b2550be6c8e533dda9f2888c712363 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Fri, 6 Dec 2024 08:03:26 -0600 Subject: [PATCH 1/3] Add Alpine 3.21 Node Dockerfile --- src/alpine/3.21/withnode/amd64/Dockerfile | 82 +++++++++++++++++++++++ src/alpine/manifest.json | 12 ++++ 2 files changed, 94 insertions(+) create mode 100644 src/alpine/3.21/withnode/amd64/Dockerfile diff --git a/src/alpine/3.21/withnode/amd64/Dockerfile b/src/alpine/3.21/withnode/amd64/Dockerfile new file mode 100644 index 00000000..eddda1dd --- /dev/null +++ b/src/alpine/3.21/withnode/amd64/Dockerfile @@ -0,0 +1,82 @@ +FROM amd64/alpine:3.21 + +# Install .NET and test dependencies +RUN apk add --upgrade --no-cache \ + autoconf \ + automake \ + bash \ + build-base \ + brotli-dev \ + ca-certificates \ + clang \ + clang-dev \ + cmake \ + coreutils \ + cpio \ + curl \ + elfutils \ + file \ + gcc \ + gettext-dev \ + git \ + icu-data-full \ + icu-dev \ + icu-libs \ + iproute2 \ + jq \ + krb5-dev \ + libtool \ + less \ + libgcc \ + libintl \ + libssl3 \ + libstdc++ \ + libunwind-dev \ + linux-headers \ + lld \ + lldb-dev \ + llvm \ + lttng-ust-dev \ + ncurses-terminfo-base \ + make \ + nodejs \ + npm \ + numactl-dev \ + openssl \ + openssl-dev \ + paxctl \ + pigz \ + py3-lldb \ + python3-dev \ + shadow \ + sudo \ + tzdata \ + userspace-rcu \ + util-linux-dev \ + which \ + zlib-dev + +# Install the latest non-preview powershell release. +RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust \ + && LATEST_TAG=$(curl -L https://api.github.com/repos/powershell/powershell/releases/latest | jq -r '.tag_name') \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/$LATEST_TAG/powershell-${LATEST_TAG#*v}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + && mkdir -p /opt/microsoft/powershell \ + && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell \ + && chmod +x /opt/microsoft/powershell/pwsh \ + && ln -s /opt/microsoft/powershell/pwsh /usr/bin/pwsh \ + && rm -f /tmp/powershell.tar.gz + +# Install azurecli from PIP +RUN azureEnv="/usr/local/share/azure-cli-env" && \ + python3 -m venv "$azureEnv" && \ + "$azureEnv/bin/python" -m pip install --upgrade setuptools && \ + "$azureEnv/bin/python" -m pip install azure-cli && \ + ln -s "$azureEnv/bin/az" /usr/local/bin/az + +# Add label for bring your own node in azure devops +LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node" + +ENV NO_UPDATE_NOTIFIER=true + +# Set node as a default command +CMD [ "node" ] diff --git a/src/alpine/manifest.json b/src/alpine/manifest.json index 6d547d98..9dda2a1a 100644 --- a/src/alpine/manifest.json +++ b/src/alpine/manifest.json @@ -257,6 +257,18 @@ "variant": "v8" } ] + }, + { + "platforms": [ + { + "dockerfile": "src/alpine/3.21/withnode/amd64", + "os": "linux", + "osVersion": "alpine3.21", + "tags": { + "alpine-3.21-withnode-amd64": {} + } + } + ] } ] } From 01d04470c6dcafa56c876a9f6fc78c68d6879228 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Fri, 6 Dec 2024 11:42:53 -0600 Subject: [PATCH 2/3] Use consistent formatting --- src/alpine/3.21/withnode/amd64/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/alpine/3.21/withnode/amd64/Dockerfile b/src/alpine/3.21/withnode/amd64/Dockerfile index eddda1dd..7864f415 100644 --- a/src/alpine/3.21/withnode/amd64/Dockerfile +++ b/src/alpine/3.21/withnode/amd64/Dockerfile @@ -67,11 +67,11 @@ RUN apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng- && rm -f /tmp/powershell.tar.gz # Install azurecli from PIP -RUN azureEnv="/usr/local/share/azure-cli-env" && \ - python3 -m venv "$azureEnv" && \ - "$azureEnv/bin/python" -m pip install --upgrade setuptools && \ - "$azureEnv/bin/python" -m pip install azure-cli && \ - ln -s "$azureEnv/bin/az" /usr/local/bin/az +RUN azureEnv="/usr/local/share/azure-cli-env" \ + && python3 -m venv "$azureEnv" \ + && "$azureEnv/bin/python" -m pip install --upgrade setuptools \ + && "$azureEnv/bin/python" -m pip install azure-cli \ + && ln -s "$azureEnv/bin/az" /usr/local/bin/az # Add label for bring your own node in azure devops LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node" From 4cc4458d8959eee56dcdf93f85ee27a3f1c800f6 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Tue, 10 Dec 2024 12:11:50 -0600 Subject: [PATCH 3/3] Remove node-ness --- src/alpine/3.21/{withnode => }/amd64/Dockerfile | 12 +----------- src/alpine/manifest.json | 16 ++++++++-------- 2 files changed, 9 insertions(+), 19 deletions(-) rename src/alpine/3.21/{withnode => }/amd64/Dockerfile (89%) diff --git a/src/alpine/3.21/withnode/amd64/Dockerfile b/src/alpine/3.21/amd64/Dockerfile similarity index 89% rename from src/alpine/3.21/withnode/amd64/Dockerfile rename to src/alpine/3.21/amd64/Dockerfile index 7864f415..5a6ada75 100644 --- a/src/alpine/3.21/withnode/amd64/Dockerfile +++ b/src/alpine/3.21/amd64/Dockerfile @@ -25,12 +25,12 @@ RUN apk add --upgrade --no-cache \ iproute2 \ jq \ krb5-dev \ - libtool \ less \ libgcc \ libintl \ libssl3 \ libstdc++ \ + libtool \ libunwind-dev \ linux-headers \ lld \ @@ -39,8 +39,6 @@ RUN apk add --upgrade --no-cache \ lttng-ust-dev \ ncurses-terminfo-base \ make \ - nodejs \ - npm \ numactl-dev \ openssl \ openssl-dev \ @@ -72,11 +70,3 @@ RUN azureEnv="/usr/local/share/azure-cli-env" \ && "$azureEnv/bin/python" -m pip install --upgrade setuptools \ && "$azureEnv/bin/python" -m pip install azure-cli \ && ln -s "$azureEnv/bin/az" /usr/local/bin/az - -# Add label for bring your own node in azure devops -LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node" - -ENV NO_UPDATE_NOTIFIER=true - -# Set node as a default command -CMD [ "node" ] diff --git a/src/alpine/manifest.json b/src/alpine/manifest.json index 9dda2a1a..b9c9acab 100644 --- a/src/alpine/manifest.json +++ b/src/alpine/manifest.json @@ -247,26 +247,26 @@ { "platforms": [ { - "architecture": "arm64", - "dockerfile": "src/alpine/3.21/helix", + "dockerfile": "src/alpine/3.21/amd64", "os": "linux", "osVersion": "alpine3.21", "tags": { - "alpine-3.21-helix-arm64v8": {} - }, - "variant": "v8" + "alpine-3.21-amd64": {} + } } ] }, { "platforms": [ { - "dockerfile": "src/alpine/3.21/withnode/amd64", + "architecture": "arm64", + "dockerfile": "src/alpine/3.21/helix", "os": "linux", "osVersion": "alpine3.21", "tags": { - "alpine-3.21-withnode-amd64": {} - } + "alpine-3.21-helix-arm64v8": {} + }, + "variant": "v8" } ] }