From b6ac0eb0e9dc8061bab74280878862c291474c83 Mon Sep 17 00:00:00 2001 From: mtrezza Date: Mon, 1 Nov 2021 01:04:00 +0000 Subject: [PATCH 1/2] ci: release commit From 671c28eea33ebba139873682283cbd240240b4c0 Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Mon, 1 Nov 2021 14:58:51 +0100 Subject: [PATCH 2/2] ci: fix docker CI with lts-alpine (#1899) --- Dockerfile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index d6ea1a3dc6..afb3bfe756 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,28 +1,33 @@ -# -# --- Base Node Image --- +############################################################ +# Build stage +############################################################ FROM node:lts-alpine AS base RUN apk update; \ apk add git; - WORKDIR /src # Copy package.json first to benefit from layer caching COPY package*.json ./ -RUN npm install --only=production + +# Install without scripts otherwise webpack will fail +RUN npm ci --production --ignore-scripts + # Copy production node_modules aside for later RUN cp -R node_modules prod_node_modules -# Install remaining dev dependencies -RUN npm install +# Copy src to have webpack config files ready for install COPY . /src +# Install remaining dev dependencies +RUN npm ci + # Run all webpack build steps RUN npm run prepare && npm run build - -# -# --- Production Image --- +############################################################ +# Release stage +############################################################ FROM node:lts-alpine AS release WORKDIR /src