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 \
88 libstdc++ \
99 && apk add --no-cache --virtual .build-deps \
1010 curl \
11- && ARCH= && alpineArch="$(apk --print-arch)" \
11+ && ARCH= OPENSSL_ARCH='linux*' && alpineArch="$(apk --print-arch)" \
1212 && 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;; \
1719 *) ;; \
1820 esac \
1921 && if [ -n "${CHECKSUM}" ]; then \
@@ -60,6 +62,8 @@ RUN addgroup -g 1000 node \
6062 && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
6163 fi \
6264 && 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 {} \; \
6367 && apk del .build-deps \
6468 # smoke tests
6569 && node --version \
You can’t perform that action at this time.
0 commit comments