Skip to content

Commit e71d35f

Browse files
authored
Document build argument
1 parent 0fc3e93 commit e71d35f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ This `onbuild` variant will only install npm packages according to the
150150
discussion in
151151
[`nodejs/docker-node#65`](https://github.com/nodejs/docker-node/issues/65).
152152

153+
Note that npm installs devDependencies by default, which is undesirable if
154+
you're building a production image. To avoid this pass NODE_ENV as a build
155+
argument i.e. `docker build --build-arg NODE_ENV=production …`.
156+
153157
## `node:slim`
154158

155159
This image does not contain the common packages contained in the default tag and

0 commit comments

Comments
 (0)