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

Docker node yarn variant #260

Closed
wants to merge 1 commit into from

Conversation

maennchen
Copy link

@maennchen maennchen commented Nov 2, 2016

@Starefossen
Copy link
Member

Starefossen commented Nov 2, 2016

While we wait for a decision regarding if yarn should be included or not we can discussion some technical issues:

  • We can not blindly install the latest version of yarn – that will become a potential issue with next major backwards incompatible release of yarn. See 0.10 and 0.12 LTS and npm #64 for a similar discussion about npm version and node v0.10 and v0.12.
  • Should we remove the /usr/local/bin/npm binary (to save space)?
  • Should we symlink /usr/local/bin/npm to /usr/local/bin/yarn for convenience?
  • Should we include some environment variable to indicate yarn version?

@maennchen
Copy link
Author

We can not blindly install the latest version of yarn

How should we determine what yarn version to install in which node version?

Should we remove the /usr/local/bin/npm binary (to save space)?

I'd rather not touch the node installation itself. I'd revisit this question as soon as nodejs/node#9161 is solved.

Should we symlink /usr/local/bin/npm to /usr/local/bin/yarn for convenience?

I think the commands are not 100% compatible.

Should we include some environment variable to indicate yarn version?

Yes. I'd implement that as soon as your first question is solved.

@Starefossen
Copy link
Member

Starefossen commented Nov 2, 2016

We can not blindly install the latest version of yarn

How should we determine what yarn version to install in which node version?

Yes, that is what we need to discuss, and since 0.x versions are not covered by SemVer it becomes quit difficult to rely upon on it (at least for production usage):

  1. Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

My suggestion would be to lock down at full version npm install -g yarn@0.16.1, at least at this point until the API is declared stable (as of v1 according to SemVer).

Keep in mind that node bundles a specific version of npm. New versions of npm is only included with new versions of node which means that one node version always links to exactly one npm version. I think we should treat yarn the same way.

@chorrell
Copy link
Contributor

chorrell commented Nov 2, 2016

I'd prefer to see a versioned install via a pgp signed Debian package rather than install via npm (as per my comment: here #243 (comment)

Also, I'm loath to add another variant. I'd prefer to take some time with this and eventually add it to the default images.

@maennchen
Copy link
Author

Yes, that is what we need to discuss, and since 0.x versions are not covered by SemVer it becomes quit difficult to rely upon on it (at least for production usage):

I think yarn doesn't even work for 0.*. At least I got an error when I tried.

My suggestion would be to lock down at full version npm install -g yarn@0.16.1, at least at this point until the API is declared stable (as of v1 according to SemVer).

Ok, can do.

I'd prefer to see a versioned install via a pgp signed Debian package rather than install via npm (as per my comment: here #243 (comment)

I can do that.

Also, I'm loath to add another variant. I'd prefer to take some time with this and add eventually add it to the default images.

There should be some kind of option on how to chose npm or yarn. But I'd also like to have yarn inside of onbuild, wheezy & slim.

@pesho
Copy link
Contributor

pesho commented Nov 2, 2016

Also, I'm loath to add another variant. I'd prefer to take some time with this and add eventually add it to the default images.

I agree. I'd like to see Yarn in the default images eventually, but I think it needs to mature a bit more first. There were breaking changes with the 0.16 release, and there are still showstopper bugs such as yarnpkg/yarn#761.

Regarding the installation method, npm install -g yarn is too space-inefficient. I'd use either the provided .deb package, or the provided webpack bundle, both of which would take about 2 MB. The Yarn releases should become PGP-signed first though.

@Starefossen
Copy link
Member

Starefossen commented Feb 10, 2017

There is now both aptitude repository and PGP signed tarball avaiable for yarn.

@pesho
Copy link
Contributor

pesho commented Feb 23, 2017

Alternative PR proposed: #337

@chorrell
Copy link
Contributor

Closing this out now that #337 has landed.

Docker Hub PR: docker-library/official-images#2703

@chorrell chorrell closed this Feb 28, 2017
@maennchen maennchen deleted the feature/yarn_official branch February 28, 2017 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants