Skip to content

Commit 487741b

Browse files
committed
refactor(docker): use npm ci
1 parent 3ece76a commit 487741b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
FROM node:18-alpine AS build
22
WORKDIR /app
33

4-
COPY package*.json ./
5-
RUN npm install
4+
COPY package*.json ./
5+
6+
RUN npm ci
67

78
COPY . .
9+
810
RUN npm run build
911

1012
FROM node:18-slim
1113
WORKDIR /app
1214

1315
COPY --from=build /app /app
1416

15-
RUN rm -rf node_modules
16-
17-
RUN npm install
17+
RUN npm ci --omit=dev
1818

1919
CMD ["node", "dist/index.js"]
20-

0 commit comments

Comments
 (0)