Skip to content

Commit

Permalink
optimized container building
Browse files Browse the repository at this point in the history
* merged all npm -g install and npm link commands
* from now on, docker should only generate 2 images, instead
of one for each npm install or npm link call
  • Loading branch information
k00ni committed Jan 10, 2017
1 parent df635fe commit bdf7c46
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,33 @@ COPY .eslintrc .eslintrc
COPY index.html index.html
COPY package.json package.json

RUN npm -g install babel-core
RUN npm -g install babel-eslint
RUN npm -g install babel-loader
RUN npm -g install babel-preset-es2015
RUN npm -g install babel-preset-react
RUN npm -g install eslint
RUN npm -g install eslint-plugin-react
RUN npm -g install eslint-loader
RUN npm -g install gulp
RUN npm -g install gulp-babel
RUN npm -g install gulp-util
RUN npm -g install webpack
RUN npm -g install webpack-dev-server

RUN npm link babel-core
RUN npm link babel-eslint
RUN npm link babel-loader
RUN npm link babel-preset-es2015
RUN npm link babel-preset-react
RUN npm link eslint
RUN npm link eslint-plugin-react
RUN npm link eslint-loader
RUN npm link gulp
RUN npm link gulp-babel
RUN npm link gulp-util
RUN npm link webpack
RUN npm link webpack-dev-server
RUN npm -g install babel-core \
babel-eslint \
babel-eslint \
babel-loader \
babel-preset-es2015 \
babel-preset-react \
eslint \
eslint-plugin-react \
eslint-loader \
gulp \
gulp-babel \
gulp-util \
webpack \
webpack-dev-server

RUN npm link babel-core \
babel-eslint \
babel-loader \
babel-preset-es2015 \
babel-preset-react \
eslint \
eslint-plugin-react \
eslint-loader \
gulp \
gulp-babel \
gulp-util \
webpack \
webpack-dev-server

CMD ["/node.sh"]

0 comments on commit bdf7c46

Please sign in to comment.