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

Add NPM 5 to the build container #12

Open
grayside opened this issue Apr 20, 2017 · 2 comments
Open

Add NPM 5 to the build container #12

grayside opened this issue Apr 20, 2017 · 2 comments

Comments

@grayside
Copy link
Contributor

grayside commented Apr 20, 2017

In order to allow easy experimenting with Yarn on projects (in the name of performance and more consistent builds) let's add it to the image.

Here's a custom Dockerfile I created to allow projects to use Yarn locally.

FROM outrigger/build:php70

RUN curl https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && \
    yum -y install yarn && \
    yum clean all

I got these steps from https://yarnpkg.com/lang/en/docs/install/#linux-tab, where the Alternatives tab notes that they recommend against installing with npm.

In order to add this to the main build image Dockerfile, I would add the repository (in the first line) as part of or after the RUN block that adds the IUS repo. Then I would add Yarn near the bottom of the list of yum packages.

We do not currently have the yum clean all, we should add it to condense the image a bit.

@febbraro febbraro changed the title Add Yarn to the build container Add NPM 5 to the build container Aug 17, 2017
@febbraro
Copy link
Member

Disregard the Yarn comment above. NPM 5 is our direction.

@febbraro febbraro added the ready label Aug 31, 2017
@grayside
Copy link
Contributor Author

We are currently headed in the direction of starting new projects on Node 8, therefore we only need to tailor the image to add npm v5 to Node 4 & 6 if we want facilitate existing projects upgrading.

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

No branches or pull requests

2 participants