feat: move install at top to keep layer in cache

This commit is contained in:
Sammy Teillet 2023-04-14 16:05:24 +02:00
parent b82660667e
commit eea7671d3e
No known key found for this signature in database
GPG Key ID: 687E513E74D28696

View File

@ -1,5 +1,8 @@
FROM node:18-alpine as server
COPY ./server/package.json ./
RUN npm install
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh && \
apk add libc6-compat
@ -7,6 +10,5 @@ RUN apk update && apk upgrade && \
WORKDIR /app/server
COPY ./server .
RUN npm install
CMD ["npm", "run", "start"]