From 48f0582b9e0879d5b79183ad03e7bba6fbcefcbe Mon Sep 17 00:00:00 2001 From: jo Date: Thu, 8 Jun 2023 15:01:29 +0200 Subject: [PATCH] refactor(front): improve docker layer caching Part-of: --- front/Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/front/Dockerfile b/front/Dockerfile index 5e750c478..fd630d4aa 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -1,16 +1,17 @@ FROM --platform=linux/amd64 node:18-alpine as builder -WORKDIR /app -COPY package.json yarn.lock /app/ -COPY src /app/src/ -COPY scripts /app/scripts -COPY public /app/public -COPY vite.config.ts index.html pwa-manifest.json /app/ - RUN apk add --no-cache jq bash coreutils python3 build-base -RUN yarn install -RUN yarn build:deployment +WORKDIR /app + +COPY package.json yarn.lock /app/ +COPY scripts /app/scripts +RUN yarn install + +COPY public /app/public +COPY src /app/src +COPY index.html pwa-manifest.json vite.config.ts /app/ +RUN yarn build:deployment FROM nginx:1.23.4-alpine as production