Add NODE_ENV ARG to onbuild template

It's currently impossible to prevent npm installing devDependencies when using the node onbuild images. Adding a NODE_ENV ARG enables `docker build --build-arg NODE_ENV=production .`, which is the equivalent of `npm install --production`. Providing the `--build-arg` is optional, so this is backwards-compatible.
This commit is contained in:
Mark Woodbridge 2016-09-15 13:50:33 +01:00 committed by GitHub
parent 2ba1b9cd87
commit aa53b15137
1 changed files with 2 additions and 0 deletions

View File

@ -1,5 +1,7 @@
FROM node:0.0.0
ARG NODE_ENV
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app