From f4f3919cbbeb2be48d74d4628c27ac6b1e435d79 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Wed, 6 May 2026 22:46:48 +0200 Subject: [PATCH 1/3] Add rust toolchain to alpine images Ran `./update.sh 26 alpine3.22,alpine3.23` --- 26/alpine3.22/Dockerfile | 2 ++ 26/alpine3.23/Dockerfile | 2 ++ Dockerfile-alpine.template | 2 ++ 3 files changed, 6 insertions(+) diff --git a/26/alpine3.22/Dockerfile b/26/alpine3.22/Dockerfile index c7dfc358a..65e7fddf8 100644 --- a/26/alpine3.22/Dockerfile +++ b/26/alpine3.22/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/26/alpine3.23/Dockerfile b/26/alpine3.23/Dockerfile index ea1819e8c..76ebf1527 100644 --- a/26/alpine3.23/Dockerfile +++ b/26/alpine3.23/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index d4096cc08..7ccaab1a1 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys From b257eed87776bbc8d74f19d4fc2e1c52f9151776 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Thu, 7 May 2026 23:32:02 +0200 Subject: [PATCH 2/3] Add rust to Node.js < 26 builds --- 22/alpine3.22/Dockerfile | 2 ++ 22/alpine3.23/Dockerfile | 2 ++ 24/alpine3.22/Dockerfile | 2 ++ 24/alpine3.23/Dockerfile | 2 ++ 25/alpine3.22/Dockerfile | 2 ++ 25/alpine3.23/Dockerfile | 2 ++ 6 files changed, 12 insertions(+) diff --git a/22/alpine3.22/Dockerfile b/22/alpine3.22/Dockerfile index 0316ad0fd..92852a488 100644 --- a/22/alpine3.22/Dockerfile +++ b/22/alpine3.22/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/22/alpine3.23/Dockerfile b/22/alpine3.23/Dockerfile index 3fc463514..5e22a4831 100644 --- a/22/alpine3.23/Dockerfile +++ b/22/alpine3.23/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/24/alpine3.22/Dockerfile b/24/alpine3.22/Dockerfile index 7c9cfb546..8bfd0b9dd 100644 --- a/24/alpine3.22/Dockerfile +++ b/24/alpine3.22/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/24/alpine3.23/Dockerfile b/24/alpine3.23/Dockerfile index 1d98f46d6..a0cc5e93d 100644 --- a/24/alpine3.23/Dockerfile +++ b/24/alpine3.23/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/25/alpine3.22/Dockerfile b/25/alpine3.22/Dockerfile index e5bf11c3a..f7514249d 100644 --- a/25/alpine3.22/Dockerfile +++ b/25/alpine3.22/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/25/alpine3.23/Dockerfile b/25/alpine3.23/Dockerfile index 94090e501..ae158a81c 100644 --- a/25/alpine3.23/Dockerfile +++ b/25/alpine3.23/Dockerfile @@ -37,6 +37,8 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ + rust \ + cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys From fda0108261551f4acfe604ee650a49f6dc054b7c Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Tue, 12 May 2026 16:31:51 +0200 Subject: [PATCH 3/3] Conditionally strip rust/cargo installation --- 22/alpine3.22/Dockerfile | 2 -- 22/alpine3.23/Dockerfile | 2 -- 24/alpine3.22/Dockerfile | 2 -- 24/alpine3.23/Dockerfile | 2 -- 25/alpine3.22/Dockerfile | 2 -- 25/alpine3.23/Dockerfile | 2 -- update.sh | 6 ++++++ 7 files changed, 6 insertions(+), 12 deletions(-) diff --git a/22/alpine3.22/Dockerfile b/22/alpine3.22/Dockerfile index 92852a488..0316ad0fd 100644 --- a/22/alpine3.22/Dockerfile +++ b/22/alpine3.22/Dockerfile @@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ - rust \ - cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/22/alpine3.23/Dockerfile b/22/alpine3.23/Dockerfile index 5e22a4831..3fc463514 100644 --- a/22/alpine3.23/Dockerfile +++ b/22/alpine3.23/Dockerfile @@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ - rust \ - cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/24/alpine3.22/Dockerfile b/24/alpine3.22/Dockerfile index 8bfd0b9dd..7c9cfb546 100644 --- a/24/alpine3.22/Dockerfile +++ b/24/alpine3.22/Dockerfile @@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ - rust \ - cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/24/alpine3.23/Dockerfile b/24/alpine3.23/Dockerfile index a0cc5e93d..1d98f46d6 100644 --- a/24/alpine3.23/Dockerfile +++ b/24/alpine3.23/Dockerfile @@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ - rust \ - cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/25/alpine3.22/Dockerfile b/25/alpine3.22/Dockerfile index f7514249d..e5bf11c3a 100644 --- a/25/alpine3.22/Dockerfile +++ b/25/alpine3.22/Dockerfile @@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ - rust \ - cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/25/alpine3.23/Dockerfile b/25/alpine3.23/Dockerfile index ae158a81c..94090e501 100644 --- a/25/alpine3.23/Dockerfile +++ b/25/alpine3.23/Dockerfile @@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \ make \ python3 \ py-setuptools \ - rust \ - cargo \ # use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150 && export GNUPGHOME="$(mktemp -d)" \ # gpg keys listed at https://github.com/nodejs/node#release-keys diff --git a/update.sh b/update.sh index 278ed8063..5d2d884ae 100755 --- a/update.sh +++ b/update.sh @@ -167,6 +167,12 @@ function update_node_version() { sed -Ei -e "/ENV YARN_VERSION/,/rm -rf \/tmp\/\*/d" "${dockerfile}-tmp" fi + # Strip out rust/cargo from Alpine images for Node < 26 since these versions don't need rust/cargo for Temporal + # See: https://github.com/nodejs/docker-node/pull/2488 + if [ "${nodeVersion:0:2}" -lt "26" ]; then + sed -Ei -e "/rust/,/cargo/d" "${dockerfile}-tmp" + fi + if diff -q "${dockerfile}-tmp" "${dockerfile}" > /dev/null; then echo "${dockerfile} is already up to date!" else