Skip to content

Commit fda0108

Browse files
committed
Conditionally strip rust/cargo installation
1 parent b257eed commit fda0108

7 files changed

Lines changed: 6 additions & 12 deletions

File tree

22/alpine3.22/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \
3737
make \
3838
python3 \
3939
py-setuptools \
40-
rust \
41-
cargo \
4240
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
4341
&& export GNUPGHOME="$(mktemp -d)" \
4442
# gpg keys listed at https://github.com/nodejs/node#release-keys

22/alpine3.23/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \
3737
make \
3838
python3 \
3939
py-setuptools \
40-
rust \
41-
cargo \
4240
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
4341
&& export GNUPGHOME="$(mktemp -d)" \
4442
# gpg keys listed at https://github.com/nodejs/node#release-keys

24/alpine3.22/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \
3737
make \
3838
python3 \
3939
py-setuptools \
40-
rust \
41-
cargo \
4240
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
4341
&& export GNUPGHOME="$(mktemp -d)" \
4442
# gpg keys listed at https://github.com/nodejs/node#release-keys

24/alpine3.23/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \
3737
make \
3838
python3 \
3939
py-setuptools \
40-
rust \
41-
cargo \
4240
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
4341
&& export GNUPGHOME="$(mktemp -d)" \
4442
# gpg keys listed at https://github.com/nodejs/node#release-keys

25/alpine3.22/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \
3737
make \
3838
python3 \
3939
py-setuptools \
40-
rust \
41-
cargo \
4240
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
4341
&& export GNUPGHOME="$(mktemp -d)" \
4442
# gpg keys listed at https://github.com/nodejs/node#release-keys

25/alpine3.23/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ RUN addgroup -g 1000 node \
3737
make \
3838
python3 \
3939
py-setuptools \
40-
rust \
41-
cargo \
4240
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
4341
&& export GNUPGHOME="$(mktemp -d)" \
4442
# gpg keys listed at https://github.com/nodejs/node#release-keys

update.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ function update_node_version() {
167167
sed -Ei -e "/ENV YARN_VERSION/,/rm -rf \/tmp\/\*/d" "${dockerfile}-tmp"
168168
fi
169169

170+
# Strip out rust/cargo from Alpine images for Node < 26 since these versions don't need rust/cargo for Temporal
171+
# See: https://github.com/nodejs/docker-node/pull/2488
172+
if [ "${nodeVersion:0:2}" -lt "26" ]; then
173+
sed -Ei -e "/rust/,/cargo/d" "${dockerfile}-tmp"
174+
fi
175+
170176
if diff -q "${dockerfile}-tmp" "${dockerfile}" > /dev/null; then
171177
echo "${dockerfile} is already up to date!"
172178
else

0 commit comments

Comments
 (0)