Skip to content

Add NPM 5 to the build container #12

@grayside

Description

@grayside

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions