Skip to content

Commit 39a7ad2

Browse files
mike-moedeNataliaTepluhina
authored andcommitted
* use production npm install for docker examples (#2365)
1 parent a031e11 commit 39a7ad2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/v2/cookbook/dockerize-vuejs-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ WORKDIR /app
2222
# copy both 'package.json' and 'package-lock.json' (if available)
2323
COPY package*.json ./
2424
25-
# install project dependencies
26-
RUN npm install
25+
# install project dependencies leaving out dev dependencies
26+
RUN npm install --production
2727
2828
# copy project files and folders to the current working directory (i.e. 'app' folder)
2929
COPY . .
@@ -66,7 +66,7 @@ Let's refactor our `Dockerfile` to use NGINX:
6666
FROM node:lts-alpine as build-stage
6767
WORKDIR /app
6868
COPY package*.json ./
69-
RUN npm install
69+
RUN npm install --production
7070
COPY . .
7171
RUN npm run build
7272

0 commit comments

Comments
 (0)