npm nodejs inside alpine docker from 3.12 to edge is not usable
Docker npm's nodejs container with Alpine 3.12 to edge is not usable (not tested other arches). Docker Host is Alpine 3.14 x86_64. Docker daemon run as is shipped, without any customization in conf.d.
To reproduce, just run a container with any alpine version from 3.12 to edge, install npm and run npm --version
.
Example:
# docker container run --name alpine -it alpine:latest
/ # apk add npm
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20191127-r5)
(2/8) Installing nghttp2-libs (1.43.0-r0)
(3/8) Installing brotli-libs (1.0.9-r5)
(4/8) Installing c-ares (1.17.2-r0)
(5/8) Installing libgcc (10.3.1_git20210424-r2)
(6/8) Installing libstdc++ (10.3.1_git20210424-r2)
(7/8) Installing nodejs (14.17.4-r0)
(8/8) Installing npm (7.17.0-r0)
Executing busybox-1.33.1-r3.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 58 MiB in 22 packages
# npm --version
#
# Fatal error in , line 0
# Check failed: reservation_.SetPermissions(protect_start, protect_size, permission).
#
#
#
#FailureMessage Object: 0x7b4857ff53b0
Illegal instruction (core dumped)
Alpine 3.11 works fine:
# docker container run --name alpine --rm -it alpine:3.11 /bin/sh
Unable to find image 'alpine:3.11' locally
3.11: Pulling from library/alpine
ddad3d7c1e96: Pull complete
Digest: sha256:6cf3d8abc08cf3792d590152d7a4628ec827621f55b1d3150383f5f39335d6eb
Status: Downloaded newer image for alpine:3.11
/ # apk upgrade -U -a
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
Upgrading critical system libraries and apk-tools:
(1/1) Upgrading apk-tools (2.10.6-r0 -> 2.10.8-r0)
Executing busybox-1.31.1-r10.trigger
Continuing the upgrade transaction with new apk-tools:
OK: 6 MiB in 14 packages
/ # apk add npm
(1/7) Installing ca-certificates (20191127-r2)
(2/7) Installing c-ares (1.17.2-r0)
(3/7) Installing libgcc (9.3.0-r0)
(4/7) Installing nghttp2-libs (1.40.0-r1)
(5/7) Installing libstdc++ (9.3.0-r0)
(6/7) Installing nodejs (12.22.4-r0)
(7/7) Installing npm (12.22.4-r0)
Executing busybox-1.31.1-r10.trigger
Executing ca-certificates-20191127-r2.trigger
OK: 64 MiB in 21 packages
/ # npm --version
6.14.14
.: Francesco