Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Install npm as part of docker build #80

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Install npm as part of docker build
  • Loading branch information
ABaldwinHunter committed Jan 20, 2016
commit 87f38d3a7305978447a441fde9c9bd058eeecf78
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY vendor/php-parser/composer.json /usr/src/app/vendor/php-parser/
COPY vendor/php-parser/composer.lock /usr/src/app/vendor/php-parser/

RUN curl --silent --location https://deb.nodesource.com/setup_5.x | bash -
RUN apt-get update && apt-get install -y nodejs python openssh-client php5-cli php5-json
RUN apt-get update && apt-get install -y nodejs npm python openssh-client php5-cli php5-json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ABaldwinHunter your issue is because of the dependency between the installation here and the nodesource install a line above. You should combine them to one RUN invocation with && so that they are cached (and invalidated) together.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbrisbin cool, thanks for the explanation!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RUN gem install bundler --no-ri --no-rdoc && \
bundle install -j 4 && \
curl -sS https://getcomposer.org/installer | php
Expand Down