Skip to content

Commit 9b12115

Browse files
authored
fix: use package-lock in dockerfile and copy node_modules (#21)
1 parent 7b3a50e commit 9b12115

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM node:lts as build
22
ARG TARGET_ENVIRONMENT="staging"
33
WORKDIR /usr/src/app
44
RUN sh -c '[ -z "$http_proxy" ] || ( npm config set proxy $http_proxy; npm config set https-proxy $http_proxy )'
5-
COPY package.json ./
6-
RUN npm install
5+
COPY package*.json ./
6+
RUN npm ci
77
COPY ./vite.config.ts ./svelte.config.js ./
88
COPY ./src ./src
99
COPY ./static ./static
@@ -15,7 +15,8 @@ FROM node:lts AS deploy
1515
WORKDIR /app
1616

1717
COPY --from=build /usr/src/app/build build/
18-
COPY --from=build /usr/src/app/package.json .
18+
COPY --from=build /usr/src/app/package*.json .
19+
COPY --from=build /usr/src/app/node_modules ./node_modules
1920

2021
EXPOSE 3000
2122

0 commit comments

Comments
 (0)