Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Add yarn #65

Closed
laggingreflex opened this issue Oct 13, 2016 · 13 comments
Closed

Add yarn #65

laggingreflex opened this issue Oct 13, 2016 · 13 comments

Comments

@laggingreflex
Copy link

Please add yarn!

https://medium.com/@mfornasa/using-yarn-with-docker-c116ad289d56#.a37dpjhmx

@mhart
Copy link
Owner

mhart commented Oct 13, 2016

As much as I love yarn (it's really cool!) – the aim of this image is to be as small as possible, so I won't add it to the existing image. It's also unlikely that npm can be removed anytime soon, so I won't replace it with yarn either.

Best option would be to create your own image with yarn (and no npm perhaps) – or just install it as the first step in your Dockerfile

@mhart mhart closed this as completed Oct 13, 2016
@ide
Copy link

ide commented Oct 21, 2016

I've opened an issue on the Yarn repo to publish it as an Alpine package: yarnpkg/yarn#1326. If someone so inclined helped with that issue, it'd be pretty easy to add RUN apk add --no-cache yarn to your Dockerfile.

@mhart mhart mentioned this issue Nov 21, 2016
Closed
@tugis
Copy link

tugis commented Nov 26, 2016

it'd be pretty easy to add RUN apk add --no-cache yarn to your Dockerfile.

I tried this both with mhart/alpine-node:6.9.1 and mhart/alpine-node:base-6.9.1. But I get:

Step 3 : RUN apk add --no-cache yarn
 ---> Running in fba68ebd12f3
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  yarn (missing):
    required by: world[yarn]

Anything missing from your solution @ide ?

@mhart
Copy link
Owner

mhart commented Nov 27, 2016

@tugis it's not actually published as an Alpine package. @ide has just suggested it.

The easiest way to install is:

$ npm install --global yarn

@styfle
Copy link

styfle commented Apr 11, 2017

Note that yarn was added to the official node images.

nodejs/docker-node#243
nodejs/docker-node#337

I'm not saying it should be added to this image, but just offering an alternative.

@mhart
Copy link
Owner

mhart commented Apr 11, 2017

@styfle yeah I noticed that a while back – I thought it would add a lot more weight than that, but it's not too bad.

Will definitely consider for 8.x

@JigSawFr
Copy link

Love to see this in node alpine !

@wclr
Copy link

wclr commented Apr 23, 2017

@mhart do you plan to create a separate image that includes yarn only without npm, or npm & yarn?

@mhart
Copy link
Owner

mhart commented Apr 23, 2017

I'll just include yarn with npm in the main image for 8.x – now that Node.js has really grown in size, I think yarn will add only a little overhead, relatively.

@wclr
Copy link

wclr commented Apr 23, 2017

Ok, this will be probably more suitable becase yarn does not fully reflects/implements npm capabilities (for example publishing).

When is it planed btw?

@mhart
Copy link
Owner

mhart commented Apr 23, 2017

Sometime in the next month I'd say: https://github.com/nodejs/LTS#lts-schedule1

@wclr
Copy link

wclr commented Apr 23, 2017

BTW consider settings by default yarn config set no-progress true to disable progress bar unlikely needed in containers.

@mhart
Copy link
Owner

mhart commented May 31, 2017

Included yarn in the latest v8.0.0 image – let me know if anyone has any problems! https://hub.docker.com/r/mhart/alpine-node/

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

No branches or pull requests

7 participants