Skip to content
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

Need official node-yarn docker image #2686

Closed
mattkime opened this issue Feb 12, 2017 · 6 comments
Closed

Need official node-yarn docker image #2686

mattkime opened this issue Feb 12, 2017 · 6 comments

Comments

@mattkime
Copy link

One of the biggest obstacles to my team adopting yarn was putting together a docker image that included yarn. After doing a bunch of work i've determined that this very easy but non-obvious. It doesn't help that search results return a number of individual contributions that are flawed in one way or another. Many use the npm install method which is not recommended and others use curl -o- -L https://yarnpkg.com/install.sh | bash which installs only for the current user.

Here's my take - https://hub.docker.com/r/mattkime/node-yarn/

Let me know if there's anything i can do to help move this forward.

@mattkime mattkime changed the title Need official node-yarn docker build Need official node-yarn docker image Feb 13, 2017
@Daniel15
Copy link
Member

Daniel15 commented Feb 13, 2017

It's hard to have an official image due to the number of possible variations. Some people might want to use Debian, others may want to use Ubuntu. Some people may want Node.js 4.x, others may want Node.js 6.x, and others may want Node.js 7.x. Some people may want npm too, other people may just want Yarn and not need npm. Should we have a Dockerfile for every single combination? We could just support one specific combination (say Ubuntu 16.04 + Node.js 7.x + Yarn) but then people will start to ask about other combinations too.

Most likely you are going to need other apps for your environment too, in which case you're better off starting with a bare root environment (such as ubuntu:16.04 or debian:stretch-slim) and installing exactly what you need.

Here's a Dockerfile we use for building Yarn itself, for example: https://github.com/yarnpkg/yarn/blob/master/Dockerfile. It installs Yarn via the Debian repo. This is available at https://hub.docker.com/r/yarnpkg/dev/. I could publish a separate Docker image with just Yarn, if you think that'd be useful.

@mattkime
Copy link
Author

mattkime commented Feb 13, 2017

@Daniel15 Extending the official node images should be sufficient. Simply because we can't satisfy all use cases doesn't mean we can't satisfy most use cases.

@Daniel15
Copy link
Member

Sure, that's doable. I'll add a Docker image soon when I revise the dev one 👍

@kachkaev
Copy link

Possible duplicate of #1577.

We'd also like to use yarn in GitLab CI, but the lack of an official Docker image keeps us in NPM.

@Daniel15
Copy link
Member

Now available as yarnpkg/node-yarn in the Docker Hub: https://hub.docker.com/r/yarnpkg/node-yarn/

C:\src\yarn> docker run -it --rm yarnpkg/node-yarn:latest /bin/bash
root@13ead647da12:/# yarn --version
0.20.3

@Daniel15
Copy link
Member

Daniel15 commented Mar 2, 2017

FYI, Yarn is now part of the official Node.js Docker image: nodejs/docker-node#243. So you don't have to use the node-yarn image any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants