Skip to content

Commit 19626fa

Browse files
committed
Only install production dependencies in Dockerfile
Running npm install on a local folder will by default also install the devDependencies specified in package.json, and this is not suitable when we are building a Dockerfile for use in production.
1 parent df2a679 commit 19626fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WORKDIR /srv/configurable-http-proxy
1212

1313
# Install configurable-http-proxy, then automatically install compatible updates
1414
# to vulnerable dependencies, and finally uninstall npm which isn't needed.
15-
RUN npm install -g \
15+
RUN npm install -g --production \
1616
&& npm audit fix \
1717
&& npm uninstall -g npm
1818

0 commit comments

Comments
 (0)