From 0da37bb06477ace043c3144ca2a3c24134c02ae8 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 27 Aug 2022 15:20:13 +0100 Subject: [PATCH] Use slim container for node build --- .gitlab-ci.yml | 6 ++---- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a20694..21ea132 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,14 +4,12 @@ stages: - deploy static: - image: node:alpine + image: node:16-slim stage: build cache: key: npm-$CI_COMMIT_REF_SLUG paths: - "$CI_PROJECT_DIR/.npm-cache" - before_script: - - apk add --no-cache bash script: - npm ci --cache .npm-cache --prefer-offline - npm run build @@ -125,7 +123,7 @@ djhtml: - git ls-files '*.html' | xargs djhtml --check --tabwidth 2 npm_lint: - image: node:alpine + image: node:16-slim stage: test dependencies: - static diff --git a/Dockerfile b/Dockerfile index b80e27e..659b654 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16 as frontend +FROM node:16-slim as frontend COPY package.json package-lock.json ./ RUN npm ci --no-audit --progress=false --omit=dev