From 36e814a1f8fc2edf54619092cbd57c692c67b644 Mon Sep 17 00:00:00 2001 From: Hans Kallekleiv <16436291+HansKallekleiv@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:28:54 +0200 Subject: [PATCH] Cache npm ci in frontend dev docker build --- frontend-dev.Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend-dev.Dockerfile b/frontend-dev.Dockerfile index 57606c4d9..41a02b1e7 100644 --- a/frontend-dev.Dockerfile +++ b/frontend-dev.Dockerfile @@ -4,13 +4,15 @@ FROM node:${NODE_TAG} USER node -COPY --chown=node:node . /usr/src/app - WORKDIR /usr/src/app/frontend RUN npm config set fetch-retry-mintimeout 100000 RUN npm config set fetch-retry-maxtimeout 600000 +COPY --chown=node:node ./frontend/package*.json ./ + RUN npm ci --ignore-scripts +COPY --chown=node:node ./frontend/ ./ + CMD ["npm", "run", "dev"]