Explorar el Código

improved caching in docker build

Bernadette Elena Hammerle hace 4 años
padre
commit
eb11372f36
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  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"]