From 1bd42f6677f065e7fdc1b37267b8e34ea0d2214b Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Fri, 1 Apr 2016 08:47:59 +0300 Subject: [PATCH] fix(docker): more efficient dockerfile for changes strictly to packages.json or bowerr.json --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d2f10b9e..f2a763a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,12 +33,13 @@ WORKDIR /opt/mean.js # and utilities docker container cache to not needing to rebuild # and install node_modules/ everytime we build the docker, but only # when the local package.json file changes. +# Install npm packages ADD package.json /opt/mean.js/package.json +RUN npm install --quiet + +# Install bower packages ADD bower.json /opt/mean.js/bower.json ADD .bowerrc /opt/mean.js/.bowerrc - -# Install MEAN.JS packages -RUN npm install --quiet RUN bower install --quiet --allow-root --config.interactive=false # Share local directory on the docker container