-
Notifications
You must be signed in to change notification settings - Fork 2k
Add an Alpine variant. #107
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Thanks, but @nodejs/docker do not merge this yet. There is long discussion and work going on to setup testing for Node.js on alpine linux and also to provide official binaries for Alpine Linux for stability and integrity purposes. |
@Starefossen would be good news to provide official binaries. About stability what do you have in mind? Some libmusl issues? |
With stability I am mostly referring to making sure the test suite is fully passing on Alpine Linux. We are also working closely with Alpine Linux maintainers on this. |
Thanks for this @shigeki 😄 As @Starefossen mentioned, we have been working towards being able to officially support Alpine. The issue stems from the fact the Node.js project doesn't officially support Alpine, so no testing is performed against it. Previous explorations with slimmed down Linux distributions has show that the binary works most of the time, but behaves unexpectedly in some edge cases. (if memory serves, I've personally had problems with the Linux command The @nodejs/docker team doens't have to take on the responsibility of owning tests for the other Docker images since they are tested upstream. Alpine is a different story. We have quite a lot in place to get testing working (smoke tests, a testing framework, etc). The big piece that is missing right now is having the time to get Jenkins setup and configured to run our tests. |
@retrohacker thx for the feedback. BTW, I've updated the Dockerfile if it can help. About Jenkins tell me if I can help on it, or moving tests to something like travis for example if more convenient. One of the major issue with alpine (but not only) ATM seems to be the snapshot feature (rel to nodejs/node#4212). About things like I'm almost done to have node 5.7.0 automated build on docker hub: https://hub.docker.com/r/rezzza/docker-node/tags/ So I give it a try tomorrow on one of our pretty complete projects (https://verylastroom.com/fr/home) & I will be able to tell more about potential issues. |
Since we delete the cache at the end we can just drop the `--no-cache` and avoid downloadind the APKINDEX for every `apk` run. We also autodetect the runtime dependencies using `scanelf` and protect them using `--virtual`.
Improve download and install of dependencies
@ncopa @Starefossen @retrohacker I close this PR as at some time official alpine binary distribution will come. I maintain a https://github.com/rezzza/docker-node which won't be a fork anymore of https://github.com/nodejs/docker-node. |
Fixes #46.
Because of alpine libmusl we have to compile nodejs, we can't simply download & use the official binary tarballs.
This PR is inspired from https://github.com/mhart/alpine-node (except node wasn't compiled like official binary distributions are, with the small-icu option.)