-
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
Separate variant including yarn #777
Comments
I think that'll be hurting since:
|
FWIW, we're looking into creating new variant for use with multi-stage builds that does not include yarn or npm. |
Yeah, I think it makes more sense to have a version without either of the package managers rather than excluding one of them. Multi-stage builds should be good enough when we get to it (or just do ~40% of all npm registry downloads goes through yarn, so it's not like it's a niche use case. (https://twitter.com/cpojer/status/988955951301570560 as source, https://stats.yarnpkg.com/ seems down) |
I made my own fork https://github.com/caub/docker-images#node, since I don't think we can agree about having npm and not yarn in the main node images 19% size gain on the slim variant |
fwiw i agree; the official node docker image should map to what node officially ships, which by default is npm and not yarn. Whether it’s niche or not is irrelevant; if it’s too niche to ship with node, it’s too niche to be on the official node docker image. |
As @SimenB, |
The size is not the issue nor the convenience. The default node docker image must not ship a package manager that neither the OS nor node ships - it’s wildly inappropriate for that decision to be made unilaterally for a single “official” node distribution (and not for all of them). If anything, the variant should be the one with yarn, as that is the one that deviates from node’s official default. |
Why don't we just make some tags then? CC: @nschonni |
@tianon is it possible for the build to use multi-stage build? One way we could do this is have the current images which are the full ones and then create other images that just copy the part of those images a la FROM alpine3.10
COPY --from=node:12-alpine3.10 /path/to/node |
@caub I know it's possible in general but not necessarily with our setup. |
Just keep in mind that multi-stage builds are still early in their support and have some caveats: |
@daveisfera my example falls into category number 2! |
I think even if the multi-stage stuff works here, it would make sense for the Yarn org to have a repo for the images that builds on top of these images. EX: that would give them control over their own versioning and patching of the images, vs. the current policy of just updating the Yarn version here when the NodeJS release is cut |
I'm not sure we are ready to take on another of these breaking changes |
Yeah, if it happens, I think it would need to be like the OnBuild deprecation that lived until the 8 release line end |
As far as I know, nothing has changed since we added it to the image almost 3 years ago, and I don't see why anything needs to change now. It's (still) by far our most requested feature, together with an alpine image. There's no real maintenance burden for us at this point, so I don't understand why we'd want to disrupt almost half of our users by changing this. Node doesn't officially support running on alpine either, yet we have that image. As long as the TSC (or something like it) doesn't come and say "hey, we don't want this is as an official distribution" I'm strongly against removing yarn (or alpine) at this point. I still think the correct solution here is distributing a version without either npm or yarn, and recommending multi stage builds. |
Would it be an idea to This would also provide easier usage for pnpm/yarn v2+ users |
Lastly, /cc @arcanis thoughts? |
A few points:
|
This patch enables Corepack, allowing to use pnpm directly and unbundling yarn from the default image. Removing yarn also simplifies the image and the maintainance. This change as been discussed in nodejs#777. Closes nodejs#777, nodejs#1645, nodejs#1755.
This patch enables Corepack, allowing to use pnpm directly and unbundling yarn from the default image. Removing yarn also simplifies the image and the maintenance. This change has been discussed in nodejs#777. Closes nodejs#777, nodejs#1645, nodejs#1755.
This patch enables Corepack, allowing to use pnpm directly and unbundling yarn from the default image. Removing yarn also simplifies the image and the maintenance. This change has been discussed in nodejs#777. Closes nodejs#777, nodejs#1645, nodejs#1755.
I proposed a patch enabling Corepack and unbundling yarn in #1768. |
I think the nodejs image should'nt contain yarn, for projects and developers not using yarn, which is very likely the majority
related: #243
yarn adds 4436kB to the image
The text was updated successfully, but these errors were encountered: