Browse Source

improved caching in docker build

Bernadette Elena Hammerle 4 năm trước cách đây
mục cha
commit
eb11372f36
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      Dockerfile

+ 3 - 4
Dockerfile

@@ -2,12 +2,11 @@ FROM node:12.13.0-alpine
 
 RUN apk add --no-cache git
 
-COPY . /app
-
+COPY package.json package-lock.json /app/
 WORKDIR /app
-
 RUN rm package-lock.json
-
 RUN npm install
 
+COPY . /app
+
 CMD ["npm", "start"]