File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ RUN addgroup -g 1000 node \
8
8
libstdc++ \
9
9
&& apk add --no-cache --virtual .build-deps \
10
10
curl \
11
- && ARCH= && alpineArch="$(apk --print-arch)" \
11
+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
12
12
&& case "${alpineArch##*-}" in \
13
- x86_64) \
14
- ARCH='x64' \
15
- CHECKSUM=CHECKSUM_x64 \
16
- ;; \
13
+ x86_64) ARCH='x64' CHECKSUM=CHECKSUM_x64 OPENSSL_ARCH=linux-x86_64;; \
14
+ x86) OPENSSL_ARCH=linux-elf;; \
15
+ aarch64) OPENSSL_ARCH=linux-aarch64;; \
16
+ arm*) OPENSSL_ARCH=linux-armv4;; \
17
+ ppc64le) OPENSSL_ARCH=linux-ppc64le;; \
18
+ s390x) OPENSSL_ARCH=linux-s390x;; \
17
19
*) ;; \
18
20
esac \
19
21
&& if [ -n "${CHECKSUM}" ]; then \
@@ -60,6 +62,8 @@ RUN addgroup -g 1000 node \
60
62
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
61
63
fi \
62
64
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
65
+ # Remove unused OpenSSL headers to save ~34MB. See this NodeJS issue: https://github.com/nodejs/node/issues/46451
66
+ && find /usr/local/include/node/openssl/archs -mindepth 1 -maxdepth 1 ! -name "$OPENSSL_ARCH" -exec rm -rf {} \; \
63
67
&& apk del .build-deps \
64
68
# smoke tests
65
69
&& node --version \
You can’t perform that action at this time.
0 commit comments