Sfoglia il codice sorgente

improved caching in docker build

Bernadette Elena Hammerle 4 anni fa
parent
commit
eb11372f36
1 ha cambiato i file con 3 aggiunte e 4 eliminazioni
  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"]