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:
parent
2ba1b9cd87
commit
aa53b15137
|
@ -1,5 +1,7 @@
|
|||
FROM node:0.0.0
|
||||
|
||||
ARG NODE_ENV
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
|
Loading…
Reference in New Issue