-
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
Switch to using Yarn tarball (or Debian package) #401
Comments
@Daniel15 thanks for letting us know 👍 I'll try to prepare a PR soon(ish) to install using the tarball. |
Great news @Daniel15! |
Will we need to modify or change the PATH if we use the tarball method? Thinking about #351 it would be good if we can install it in such a way that a user can add their own version of yarn if the want to override the pre-installed version. Looking here it seems that yarn is installed in https://yarnpkg.com/en/docs/install#alternatives-tab We might not want to use |
The yarn debian package installs yarn in |
It's just a tarball; you can extract it wherever you want 😃 If you like, you could extract Yarn to
That should work. The tarball wasn't really built with that in mind though, so there's some files at the root (
The Debian package installs to |
Ah, right. So would it be preferable to use the debian package given the issues noted in #351? And what about the Alpine variant? |
FWIW I'd prefer using an uniform install method across all image variants, i.e. using the tarball everywhere. Unless there's a compelling reason to prefer the deb package when possible. |
I generally would to, but I'm concerned about compatibility and issues like #351. I guess the other advantage is that users of the base image can easily update yarn themselves if they have to. If there was an Alpine yarn package this would be a much easier decision. |
I really like the debian package since it gives users an easy way to update as well as not having to decide ourself where files should be placed, they just use the default decided by the debian package. |
Users can still update if the tarball is used, they just have to use the same method (i.e. unpack the tarball). Or, if they really really really need to use a different method, they can delete the old yarn installation first. Updating components already included in the image (Node, NPM, Yarn) should be discouraged anyway.
We need to decide that anyway for the Alpine variant. P.S. I tested unpacking into |
Proposed PR to switch to using tarball: #403 |
There is! https://pkgs.alpinelinux.org/package/edge/community/x86_64/yarn. Looks like it hasn't been updated for 0.24.x yet though. Note that the Alpine package is community maintained (it's not directly published by the Yarn team) |
Hello!
When Yarn was added to the Docker image in #337, it was decided to use the standalone .js version of Yarn. This made sense at the time, as all the other installation methods were much larger.
In Yarn 0.24.x, we changed all the other installation methods (such as the tarball, Debian package, and Windows installer) to just include the standalone .js file rather than including the raw JS plus the whole
node_modules
directory. This reduced their size significantly, and now the other installation methods are only slightly larger than the standalone .js file.In addition to this, the regular installation methods are faster at runtime because they bundle v8-compile-cache, which requires a separate small .js file to bootstrap it (so it can't be done with just the standalone .js file)
The text was updated successfully, but these errors were encountered: