Import fails when using node alpine docker image
See original GitHub issueI’m using the docker image node:alpine3.11
to build and deploy my application.
internal/modules/cjs/loader.js:1197
return process.dlopen(module, path.toNamespacedPath(filename));
Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/app/node_modules/sodium-native/prebuilds/linux-x64/libsodium.so.23)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1197:18)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at load (/usr/app/node_modules/node-gyp-build/index.js:21:10)
at Object.<anonymous> (/usr/app/node_modules/sodium-native/index.js:1:39)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Docker Node Alpine Image Build Fails on node-gyp
I'm attempting to Dockerize a Vue. js application. I'm using the node:10.15-alpine Docker image as a base. The image build fails with the ......
Read more >Multi-stage builds - Docker Documentation
When you run the build.sh script, it needs to build the first image, create a container from it to copy the artifact out,...
Read more >Running under Docker - Node-RED
This guide assumes you have some basic familiarity with Docker and the Docker Command Line. It describes some of the many ways Node-RED...
Read more >Use kaniko to build Docker images - GitLab Documentation
If you receive this error, it might be due to an outside proxy. Setting the http_proxy and https_proxy environment variables can fix the...
Read more >10 best practices to containerize Node.js web applications ...
js Docker team. The Node.js image bundles the Alpine operating system which is powered by the minimal busybox software tooling and the musl...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This might be helpful to others. I’m using the following Dockerfile instructions using alpine linux. The environment variable helps in finding the prebuilt version:
and a new version with node 16 (includes python3 instead of python2):
The
node:alpine3.11
tag runs the latest version of node (13.13.0) on alpine 3.11