You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It may be a bit premature to decide that yet, but I was thinking about the same yesterday. Given the overwhelmingly positive response to the Yarn release (~9300 GitHub stars in just one day, ~1600 upvotes on HN) this might become a very common request.
I've done a quick test, and adding Yarn to the -slim image (via npm install -g yarn) adds 21.1 MB to the size.
It's probably something we could add in the future if there was enough demand for it, but I'm pretty ambivalent about it at this point since it's so new. I'd prefer to keep the images fairly simple, especially the slim variant, since the main point is to use it as a base image and install dependencies etc on top of it.
For installation, I would be more inclined to use the Yarn Debian package repository (under Linux):
Tried that yesterday. Currently doesn't work on our images, because their packages depend on an installed recent nodejs DEB package (which should probably be relaxed to Recommends or Suggests).
Currently doesn't work on our images, because their packages depend on an installed recent nodejs DEB package (which should probably be relaxed to Recommends or Suggests).
This would break the out-of-the-box experience for people that are just getting started. Without Node.js being installed, apt-get install yarn then yarn will show an error about nodejs not being found.
Most people are on Ubuntu 16.04 which has Node.js 4.2.6 in the repo, and the NodeSource repo can be added to get Node 6.
Reacted by Bernhard Häussner and Konstantin Tarkus
The absence of a nodejs package does not indicate that Node.js is not installed. There are many popular alternative installation methods, such as nvm, nave, n, make install, binary tarballs, and so on.
@Daniel15 a Recommends relation would also not break the out-of-the-box experience, as recommended packages are installed by default on both Ubuntu and Debian. But it would allow those who have installed Node in a different way to opt out of the DEB package.
@Fishrock123 I don't think any of Docker WG members are suggesting we should add Yarn at this point, but that might change if Yarn becomes a popular request by the masses.
If you guys would tag your releases on here we could fork the repo and use our custom images (including yarn). But since you don't, it's pretty hard to establish a workflow based on your official image (which is sad).
Looks like yarn was added to all official node images – perfect! README on Docker Hub does not mention yarn so it may be confusing, but the recipes themselves do include it! 🎉 🎉 🎉
Reacted by Steven, Jonathon Munsell, Saran Tanpituckpong ✔️ and Benjamin Christau
Reacted by John Haley, Mantas Domaševičius and Jorge Cuevas
@Starefossen This still seems to be missing from the docs.
I was surprised when I looked at the environment variables for a recent node app to see "YARN_VERSION":"0.21.3". I checked the docs on Docker Hub and there was nothing mentioning Yarn. Eventually I found this issue.
Activity
pesho commentedon Oct 12, 2016
It may be a bit premature to decide that yet, but I was thinking about the same yesterday. Given the overwhelmingly positive response to the Yarn release (~9300 GitHub stars in just one day, ~1600 upvotes on HN) this might become a very common request.
I've done a quick test, and adding Yarn to the
-slimimage (vianpm install -g yarn) adds 21.1 MB to the size.nodkz commentedon Oct 12, 2016
Current official
nodeimage sizes:Yep, Yarp adds 10% to size for
node:slimbut:Agreed that needs to wait some time (a couple of hours 😂) till it became a new standart.
List of most fat packages in
yarn. May be some dependencies can be removed. Or bundled with tree-shaking.chorrell commentedon Oct 12, 2016
It's probably something we could add in the future if there was enough demand for it, but I'm pretty ambivalent about it at this point since it's so new. I'd prefer to keep the images fairly simple, especially the slim variant, since the main point is to use it as a base image and install dependencies etc on top of it.
For installation, I would be more inclined to use the Yarn Debian package repository (under Linux):
https://yarnpkg.com/en/docs/install
That more closely follows the best practices for official images (pgp signed packages):
https://github.com/docker-library/official-images#image-build
pesho commentedon Oct 12, 2016
Tried that yesterday. Currently doesn't work on our images, because their packages depend on an installed recent
nodejsDEB package (which should probably be relaxed toRecommendsorSuggests).chorrell commentedon Oct 12, 2016
Ugh, ok. Maybe at some point they'll pgp sign the tarball.
pesho commentedon Oct 12, 2016
It looks like there may be soon a ~ 2 MB bundled release which is CLI-compatible: yarnpkg/yarn#888. If that works, I'm definitely +1 on including it.
Daniel15 commentedon Oct 12, 2016
This would break the out-of-the-box experience for people that are just getting started. Without Node.js being installed,
apt-get install yarnthenyarnwill show an error aboutnodejsnot being found.Most people are on Ubuntu 16.04 which has Node.js 4.2.6 in the repo, and the NodeSource repo can be added to get Node 6.
pesho commentedon Oct 12, 2016
The absence of a
nodejspackage does not indicate that Node.js is not installed. There are many popular alternative installation methods, such asnvm,nave,n,make install, binary tarballs, and so on.pesho commentedon Oct 12, 2016
@Daniel15 a
Recommendsrelation would also not break the out-of-the-box experience, as recommended packages are installed by default on both Ubuntu and Debian. But it would allow those who have installed Node in a different way to opt out of the DEB package.Fishrock123 commentedon Oct 17, 2016
Are we talking about shipping with Yarn? Because that's not a thing in core yet and I'm not sure that is a good idea at this time.
Starefossen commentedon Oct 17, 2016
@Fishrock123 I don't think any of Docker WG members are suggesting we should add Yarn at this point, but that might change if Yarn becomes a popular request by the masses.
chorrell commentedon Oct 18, 2016
Yes, that's my understanding too: this is just about adding yarn to the docker images.
andrewmclagan commentedon Oct 31, 2016
Any timeline for this?
Starefossen commentedon Oct 31, 2016
@andrewmclagan at them moment no, there is a similar discussion over at nodejs/node#9161.
jeremyzahner commentedon Nov 2, 2016
If you guys would tag your releases on here we could fork the repo and use our custom images (including yarn). But since you don't, it's pretty hard to establish a workflow based on your official image (which is sad).
20 remaining items
pesho commentedon Feb 23, 2017
New proposal PR created: #337
chorrell commentedon Feb 28, 2017
The latest version of yarn is now being added via #337
Here's the Docker Hub PR: docker-library/official-images#2703
kachkaev commentedon Mar 2, 2017
Looks like yarn was added to all official node images – perfect! README on Docker Hub does not mention yarn so it may be confusing, but the recipes themselves do include it! 🎉 🎉 🎉
Starefossen commentedon Mar 2, 2017
Yes, there is a pending PR to update documentation.
styfle commentedon Mar 27, 2017
@Starefossen This still seems to be missing from the docs.
I was surprised when I looked at the environment variables for a recent node app to see
"YARN_VERSION":"0.21.3". I checked the docs on Docker Hub and there was nothing mentioning Yarn. Eventually I found this issue.Which PR is supposed to add the docs?
Starefossen commentedon Mar 27, 2017
@styfle #345 added this to the README of this repository, I'll look into why that has not been propagated onto Docker Hub. Thank you 🙂
romandrahan commentedon Jul 19, 2017
Why
yarnversion is so much outdated? It's still0.24.6while latest published is already0.27.5, which has many minor bug fixes.SimenB commentedon Jul 19, 2017
Because of a miscommunication in when to update it. Next release will have it updated
styfle commentedon Jul 19, 2017
@Starefossen @SimenB Any idea why the readme on Docker Hub is still outdated*?
*Notice no mention of yarn
SimenB commentedon Jul 19, 2017
I don't know how that file is updated...
chorrell commentedon Jul 19, 2017
It requires a separate PR to https://github.com/docker-library/docs
They don't automatically pull in our README.md or docs unfortunately.
Update node README.md
styfle commentedon Jul 19, 2017
@chorrell Thanks, I submitted a PR in docker-library/docs#964
SimenB commentedon Jul 20, 2017
@romandragan FWIW 8.2.0 will have a updated Yarn installation. We'll update the others when a new version of node is released for them