-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Node.js "core" image #808
Conversation
I cancelled the branch build since the PR build should be good enough. In the future I'll do PRs from my fork. |
Also note that I have not update the README.md yet to document this new variant. |
I think it makes sense to remove both. Multi-stage builds really removes the need for them, and allows people to get really small images. @chorrell thoughts on having a core version for alpine as well? People pick alpine since it's tiny, making an even smaller version makes sense to me. Can of course be done in a follow-up! |
Indeed, a |
@pesho wouldn't that mean installing node, removing npm, then create another image to add back npm? |
@LaurentGoderre exactly. Is there another viable alternative? |
I think it would be cool to change the tags to have |
Building an alpine image without npm is easy enough I guess, but I'm generally 👎 about creating an alpine core image. I'd be more convinced if we had official MUSL/alpine binaries to use but until then I think we need to be honest with ourselves and our users about the level of support they can expect when it comes to Alpine. |
There have been external requests for an alpine-core images... which could be made with the single change of /cc @mhart who manages https://github.com/mhart/alpine-node and may have opinions |
Just to make sure, is "Node.js core" something that has the intended meaning with upstream too? (ie, will Node.js users already be familiar with that as a term, or is this an entirely new construct? the discussion in nodejs/Release#341 seems to imply that this is still a little bit in flux, so it might make sense to make sure the larger Node.js project is on board with the "core" name before committing to it too much) |
+1 to what @tianon just mentioned. I find the use of the term Is there a reason to avoid using |
I chose the name arbitrarily. I’m open to alternatives. |
Other alternatives: |
Or even copy debian: |
Also, I don't see any alpine images here – wouldn't they be the most... tiny? |
Yes, but but I didn't include them for reasons noted in #808 (comment) |
Mostly just curious (not asking for more work!): What's the status of this PR? |
No consensus on what it should be called I think. |
Anything I can do to help push toward getting consensus? 🤗 |
@bnb I personally don't care what the name is, seems like something the node core collaborators should decide on? |
This is an image without npm or yarn installed, suitable for multi-stage builds. Also: - Skip setting yarn version in core variant - Skip npm and yarn tests for "core" variant Closes #404
I propose |
I would suggest we avoid words related to size as part of the name. What would happen the day we make it smaller than Edit: also, I think |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! This is super nice.
I foresee some problem with the base image being use (the same way we had issue transitioning the default tag from jessie to stretch. I would be tempted to use a suffix like |
We could also use the same image and add an |
mhart/alpine-node has a |
It's not quite the same thing – that's a static build which might not work with native modules. The third example here is basically what's being proposed here, I think: https://github.com/mhart/alpine-node#example-dockerfile-for-your-own-nodejs-project |
I won't be able to carry this forward. If someone else want's to take this on, "base" is probably a better name than "core" |
too bad here's a workaround: https://github.com/brigand/jellobot/blob/master/src/plugins/js-eval/Dockerfile#L8, but a node core image would have made things simpler for the final image |
This is an image without npm or yarn installed, suitable for multi-stage
builds.
Also:
Closes #404
Things left to do: