-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node: feat: Node.js 21.2.0 #15729
Merged
Merged
Node: feat: Node.js 21.2.0 #15729
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 tasks
This comment has been minimized.
This comment has been minimized.
b70fdc8
to
2de55e2
Compare
Diff for 2de55e2:diff --git a/_bashbrew-cat b/_bashbrew-cat
index d65aa2e..350c5fb 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -9,12 +9,12 @@ Directory: 18/bookworm
Tags: 18-alpine, 18-alpine3.18, 18.18-alpine, 18.18-alpine3.18, 18.18.2-alpine, 18.18.2-alpine3.18, hydrogen-alpine, hydrogen-alpine3.18
Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 6c20762ebfb6ab35c874c4fe540a55ab8fd6c49d
+GitCommit: e148eb79f51510593647e6a10574f8931bf16384
Directory: 18/alpine3.18
Tags: 18-alpine3.17, 18.18-alpine3.17, 18.18.2-alpine3.17, hydrogen-alpine3.17
Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 6c20762ebfb6ab35c874c4fe540a55ab8fd6c49d
+GitCommit: e148eb79f51510593647e6a10574f8931bf16384
Directory: 18/alpine3.17
Tags: 18-bookworm-slim, 18-slim, 18.18-bookworm-slim, 18.18-slim, 18.18.2-bookworm-slim, 18.18.2-slim, hydrogen-bookworm-slim, hydrogen-slim
@@ -49,12 +49,12 @@ Directory: 20/bookworm
Tags: 20-alpine, 20-alpine3.18, 20.9-alpine, 20.9-alpine3.18, 20.9.0-alpine, 20.9.0-alpine3.18, iron-alpine, iron-alpine3.18, lts-alpine, lts-alpine3.18
Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: e148eb79f51510593647e6a10574f8931bf16384
Directory: 20/alpine3.18
Tags: 20-alpine3.17, 20.9-alpine3.17, 20.9.0-alpine3.17, iron-alpine3.17, lts-alpine3.17
Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: e148eb79f51510593647e6a10574f8931bf16384
Directory: 20/alpine3.17
Tags: 20-bookworm-slim, 20-slim, 20.9-bookworm-slim, 20.9-slim, 20.9.0-bookworm-slim, 20.9.0-slim, iron-bookworm-slim, iron-slim, lts-bookworm-slim, lts-slim
@@ -82,32 +82,32 @@ Architectures: amd64, arm32v7, arm64v8
GitCommit: dbc174542d51f03535f6513391f569e3b93a91dd
Directory: 20/buster-slim
-Tags: 21, 21-bookworm, 21.1, 21.1-bookworm, 21.1.0, 21.1.0-bookworm, bookworm, current, current-bookworm, latest
+Tags: 21, 21-bookworm, 21.2, 21.2-bookworm, 21.2.0, 21.2.0-bookworm, bookworm, current, current-bookworm, latest
Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: ed83529ea65cfbeadda161ee501b4cf83444aa2d
Directory: 21/bookworm
-Tags: 21-alpine, 21-alpine3.18, 21.1-alpine, 21.1-alpine3.18, 21.1.0-alpine, 21.1.0-alpine3.18, alpine, alpine3.18, current-alpine, current-alpine3.18
+Tags: 21-alpine, 21-alpine3.18, 21.2-alpine, 21.2-alpine3.18, 21.2.0-alpine, 21.2.0-alpine3.18, alpine, alpine3.18, current-alpine, current-alpine3.18
Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: ed83529ea65cfbeadda161ee501b4cf83444aa2d
Directory: 21/alpine3.18
-Tags: 21-alpine3.17, 21.1-alpine3.17, 21.1.0-alpine3.17, alpine3.17, current-alpine3.17
+Tags: 21-alpine3.17, 21.2-alpine3.17, 21.2.0-alpine3.17, alpine3.17, current-alpine3.17
Architectures: amd64, arm32v6, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: ed83529ea65cfbeadda161ee501b4cf83444aa2d
Directory: 21/alpine3.17
-Tags: 21-bookworm-slim, 21-slim, 21.1-bookworm-slim, 21.1-slim, 21.1.0-bookworm-slim, 21.1.0-slim, bookworm-slim, current-bookworm-slim, current-slim, slim
+Tags: 21-bookworm-slim, 21-slim, 21.2-bookworm-slim, 21.2-slim, 21.2.0-bookworm-slim, 21.2.0-slim, bookworm-slim, current-bookworm-slim, current-slim, slim
Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: ed83529ea65cfbeadda161ee501b4cf83444aa2d
Directory: 21/bookworm-slim
-Tags: 21-bullseye, 21.1-bullseye, 21.1.0-bullseye, bullseye, current-bullseye
+Tags: 21-bullseye, 21.2-bullseye, 21.2.0-bullseye, bullseye, current-bullseye
Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: ed83529ea65cfbeadda161ee501b4cf83444aa2d
Directory: 21/bullseye
-Tags: 21-bullseye-slim, 21.1-bullseye-slim, 21.1.0-bullseye-slim, bullseye-slim, current-bullseye-slim
+Tags: 21-bullseye-slim, 21.2-bullseye-slim, 21.2.0-bullseye-slim, bullseye-slim, current-bullseye-slim
Architectures: amd64, arm32v7, arm64v8, ppc64le, s390x
-GitCommit: 62c2e3cfb17ba8d9167b0daebbff9ea5ecaef6e4
+GitCommit: ed83529ea65cfbeadda161ee501b4cf83444aa2d
Directory: 21/bullseye-slim
diff --git a/_bashbrew-list b/_bashbrew-list
index 618755d..9094ce2 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -73,24 +73,24 @@ node:21-bookworm-slim
node:21-bullseye
node:21-bullseye-slim
node:21-slim
-node:21.1
-node:21.1-alpine
-node:21.1-alpine3.17
-node:21.1-alpine3.18
-node:21.1-bookworm
-node:21.1-bookworm-slim
-node:21.1-bullseye
-node:21.1-bullseye-slim
-node:21.1-slim
-node:21.1.0
-node:21.1.0-alpine
-node:21.1.0-alpine3.17
-node:21.1.0-alpine3.18
-node:21.1.0-bookworm
-node:21.1.0-bookworm-slim
-node:21.1.0-bullseye
-node:21.1.0-bullseye-slim
-node:21.1.0-slim
+node:21.2
+node:21.2-alpine
+node:21.2-alpine3.17
+node:21.2-alpine3.18
+node:21.2-bookworm
+node:21.2-bookworm-slim
+node:21.2-bullseye
+node:21.2-bullseye-slim
+node:21.2-slim
+node:21.2.0
+node:21.2.0-alpine
+node:21.2.0-alpine3.17
+node:21.2.0-alpine3.18
+node:21.2.0-bookworm
+node:21.2.0-bookworm-slim
+node:21.2.0-bullseye
+node:21.2.0-bullseye-slim
+node:21.2.0-slim
node:alpine
node:alpine3.17
node:alpine3.18
diff --git a/node_current-alpine3.17/Dockerfile b/node_current-alpine3.17/Dockerfile
index 54ba8fd..ad82a30 100644
--- a/node_current-alpine3.17/Dockerfile
+++ b/node_current-alpine3.17/Dockerfile
@@ -1,6 +1,6 @@
FROM alpine:3.17
-ENV NODE_VERSION 21.1.0
+ENV NODE_VERSION 21.2.0
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
@@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
- && ARCH= && alpineArch="$(apk --print-arch)" \
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
- x86_64) \
- ARCH='x64' \
- CHECKSUM="987dac3f01a5b81bd3674edcf984161ed145995f2f11e7b5893249af5fa237e8" \
- ;; \
+ x86_64) ARCH='x64' CHECKSUM="e5d565cc86043625e3c15b8377e9c68b939beed323759a5bd6a69ee87f888ac8" OPENSSL_ARCH=linux-x86_64;; \
+ x86) OPENSSL_ARCH=linux-elf;; \
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
+ arm*) OPENSSL_ARCH=linux-armv4;; \
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
+ s390x) OPENSSL_ARCH=linux-s390x;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
@@ -70,6 +72,8 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apk del .build-deps \
# smoke tests
&& node --version \
diff --git a/node_current-alpine3.18/Dockerfile b/node_current-alpine3.18/Dockerfile
index bb46822..1af6e7a 100644
--- a/node_current-alpine3.18/Dockerfile
+++ b/node_current-alpine3.18/Dockerfile
@@ -1,6 +1,6 @@
FROM alpine:3.18
-ENV NODE_VERSION 21.1.0
+ENV NODE_VERSION 21.2.0
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
@@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
- && ARCH= && alpineArch="$(apk --print-arch)" \
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
- x86_64) \
- ARCH='x64' \
- CHECKSUM="987dac3f01a5b81bd3674edcf984161ed145995f2f11e7b5893249af5fa237e8" \
- ;; \
+ x86_64) ARCH='x64' CHECKSUM="e5d565cc86043625e3c15b8377e9c68b939beed323759a5bd6a69ee87f888ac8" OPENSSL_ARCH=linux-x86_64;; \
+ x86) OPENSSL_ARCH=linux-elf;; \
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
+ arm*) OPENSSL_ARCH=linux-armv4;; \
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
+ s390x) OPENSSL_ARCH=linux-s390x;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
@@ -70,6 +72,8 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apk del .build-deps \
# smoke tests
&& node --version \
diff --git a/node_current-bullseye-slim/Dockerfile b/node_current-bullseye-slim/Dockerfile
index 15b1d64..5dde765 100644
--- a/node_current-bullseye-slim/Dockerfile
+++ b/node_current-bullseye-slim/Dockerfile
@@ -3,16 +3,16 @@ FROM debian:bullseye-slim
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
-ENV NODE_VERSION 21.1.0
+ENV NODE_VERSION 21.2.0
-RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
+RUN ARCH= OPENSSL_ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
- amd64) ARCH='x64';; \
- ppc64el) ARCH='ppc64le';; \
- s390x) ARCH='s390x';; \
- arm64) ARCH='arm64';; \
- armhf) ARCH='armv7l';; \
- i386) ARCH='x86';; \
+ amd64) ARCH='x64' OPENSSL_ARCH='linux-x86_64';; \
+ ppc64el) ARCH='ppc64le' OPENSSL_ARCH='linux-ppc64le';; \
+ s390x) ARCH='s390x' OPENSSL_ARCH='linux*-s390x';; \
+ arm64) ARCH='arm64' OPENSSL_ARCH='linux-aarch64';; \
+ armhf) ARCH='armv7l' OPENSSL_ARCH='linux-armv4';; \
+ i386) ARCH='x86' OPENSSL_ARCH='linux-elf';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& set -ex \
@@ -46,6 +46,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apt-mark auto '.*' > /dev/null \
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
diff --git a/node_current-bullseye/Dockerfile b/node_current-bullseye/Dockerfile
index 41a8240..e8970d6 100644
--- a/node_current-bullseye/Dockerfile
+++ b/node_current-bullseye/Dockerfile
@@ -3,7 +3,7 @@ FROM buildpack-deps:bullseye
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
-ENV NODE_VERSION 21.1.0
+ENV NODE_VERSION 21.2.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
diff --git a/node_hydrogen-alpine3.17/Dockerfile b/node_hydrogen-alpine3.17/Dockerfile
index 471ed14..55bf05a 100644
--- a/node_hydrogen-alpine3.17/Dockerfile
+++ b/node_hydrogen-alpine3.17/Dockerfile
@@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
- && ARCH= && alpineArch="$(apk --print-arch)" \
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
- x86_64) \
- ARCH='x64' \
- CHECKSUM="b02028add9898575516a2626a5f1a262f080291d8f253ba1fd61cedb0e476591" \
- ;; \
+ x86_64) ARCH='x64' CHECKSUM="b02028add9898575516a2626a5f1a262f080291d8f253ba1fd61cedb0e476591" OPENSSL_ARCH=linux-x86_64;; \
+ x86) OPENSSL_ARCH=linux-elf;; \
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
+ arm*) OPENSSL_ARCH=linux-armv4;; \
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
+ s390x) OPENSSL_ARCH=linux-s390x;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
@@ -70,6 +72,8 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apk del .build-deps \
# smoke tests
&& node --version \
diff --git a/node_hydrogen-alpine3.18/Dockerfile b/node_hydrogen-alpine3.18/Dockerfile
index b1fbc44..669e2db 100644
--- a/node_hydrogen-alpine3.18/Dockerfile
+++ b/node_hydrogen-alpine3.18/Dockerfile
@@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
- && ARCH= && alpineArch="$(apk --print-arch)" \
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
- x86_64) \
- ARCH='x64' \
- CHECKSUM="b02028add9898575516a2626a5f1a262f080291d8f253ba1fd61cedb0e476591" \
- ;; \
+ x86_64) ARCH='x64' CHECKSUM="b02028add9898575516a2626a5f1a262f080291d8f253ba1fd61cedb0e476591" OPENSSL_ARCH=linux-x86_64;; \
+ x86) OPENSSL_ARCH=linux-elf;; \
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
+ arm*) OPENSSL_ARCH=linux-armv4;; \
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
+ s390x) OPENSSL_ARCH=linux-s390x;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
@@ -70,6 +72,8 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apk del .build-deps \
# smoke tests
&& node --version \
diff --git a/node_latest/Dockerfile b/node_latest/Dockerfile
index 70aab56..1b22bfa 100644
--- a/node_latest/Dockerfile
+++ b/node_latest/Dockerfile
@@ -3,7 +3,7 @@ FROM buildpack-deps:bookworm
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
-ENV NODE_VERSION 21.1.0
+ENV NODE_VERSION 21.2.0
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
diff --git a/node_lts-alpine3.17/Dockerfile b/node_lts-alpine3.17/Dockerfile
index dc46a75..aab1625 100644
--- a/node_lts-alpine3.17/Dockerfile
+++ b/node_lts-alpine3.17/Dockerfile
@@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
- && ARCH= && alpineArch="$(apk --print-arch)" \
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
- x86_64) \
- ARCH='x64' \
- CHECKSUM="a3cfa3eabebdcbb677256227b9ff44dad88bff37fd9de886077d670dc8fddb6b" \
- ;; \
+ x86_64) ARCH='x64' CHECKSUM="a3cfa3eabebdcbb677256227b9ff44dad88bff37fd9de886077d670dc8fddb6b" OPENSSL_ARCH=linux-x86_64;; \
+ x86) OPENSSL_ARCH=linux-elf;; \
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
+ arm*) OPENSSL_ARCH=linux-armv4;; \
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
+ s390x) OPENSSL_ARCH=linux-s390x;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
@@ -70,6 +72,8 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apk del .build-deps \
# smoke tests
&& node --version \
diff --git a/node_lts-alpine3.18/Dockerfile b/node_lts-alpine3.18/Dockerfile
index 011f522..49271e3 100644
--- a/node_lts-alpine3.18/Dockerfile
+++ b/node_lts-alpine3.18/Dockerfile
@@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
- && ARCH= && alpineArch="$(apk --print-arch)" \
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
- x86_64) \
- ARCH='x64' \
- CHECKSUM="a3cfa3eabebdcbb677256227b9ff44dad88bff37fd9de886077d670dc8fddb6b" \
- ;; \
+ x86_64) ARCH='x64' CHECKSUM="a3cfa3eabebdcbb677256227b9ff44dad88bff37fd9de886077d670dc8fddb6b" OPENSSL_ARCH=linux-x86_64;; \
+ x86) OPENSSL_ARCH=linux-elf;; \
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
+ arm*) OPENSSL_ARCH=linux-armv4;; \
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
+ s390x) OPENSSL_ARCH=linux-s390x;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
@@ -70,6 +72,8 @@ RUN addgroup -g 1000 node \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apk del .build-deps \
# smoke tests
&& node --version \
diff --git a/node_slim/Dockerfile b/node_slim/Dockerfile
index d97fba8..91cb5c4 100644
--- a/node_slim/Dockerfile
+++ b/node_slim/Dockerfile
@@ -3,16 +3,16 @@ FROM debian:bookworm-slim
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
-ENV NODE_VERSION 21.1.0
+ENV NODE_VERSION 21.2.0
-RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
+RUN ARCH= OPENSSL_ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
- amd64) ARCH='x64';; \
- ppc64el) ARCH='ppc64le';; \
- s390x) ARCH='s390x';; \
- arm64) ARCH='arm64';; \
- armhf) ARCH='armv7l';; \
- i386) ARCH='x86';; \
+ amd64) ARCH='x64' OPENSSL_ARCH='linux-x86_64';; \
+ ppc64el) ARCH='ppc64le' OPENSSL_ARCH='linux-ppc64le';; \
+ s390x) ARCH='s390x' OPENSSL_ARCH='linux*-s390x';; \
+ arm64) ARCH='arm64' OPENSSL_ARCH='linux-aarch64';; \
+ armhf) ARCH='armv7l' OPENSSL_ARCH='linux-armv4';; \
+ i386) ARCH='x86' OPENSSL_ARCH='linux-elf';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& set -ex \
@@ -46,6 +46,8 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
&& apt-mark auto '.*' > /dev/null \
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ Relevant Maintainers:
|
LaurentGoderre
approved these changes
Nov 15, 2023
yosifkit
approved these changes
Nov 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: nodejs/docker-node#1997
@LaurentGoderre @PeterDaveHello @SimenB @Starefossen @nschonni @ttshivers