Bumps the docker-dependencies group with 2 updates: node and nginxinc/nginx-unprivileged. Updates `node` from `2bdb65e` to `fb71d01` Updates `nginxinc/nginx-unprivileged` from `0a1e718` to `37f356a` --- updated-dependencies: - dependency-name: node dependency-version: 24-alpine dependency-type: direct:production dependency-group: docker-dependencies - dependency-name: nginxinc/nginx-unprivileged dependency-version: stable-alpine dependency-type: direct:production dependency-group: docker-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
35 lines
1.3 KiB
Docker
35 lines
1.3 KiB
Docker
#####################################
|
|
# Build the app to a static website #
|
|
#####################################
|
|
# Modifier --platform=$BUILDPLATFORM limits the platform to "BUILDPLATFORM" during buildx multi-platform builds
|
|
# This is because npm "chromedriver" package is not compatiable with all platforms
|
|
# For more info see: https://docs.docker.com/build/building/multi-platform/#cross-compilation
|
|
FROM --platform=$BUILDPLATFORM node:24-alpine@sha256:fb71d01345f11b708a3553c66e7c74074f2d506400ea81973343d915cb64eef0 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json .
|
|
COPY package-lock.json .
|
|
|
|
# Install dependencies
|
|
# --ignore-scripts prevents postinstall script (which runs grunt) as it depends on files other than package.json
|
|
RUN npm ci --ignore-scripts
|
|
|
|
# Copy files needed for postinstall and build
|
|
COPY . .
|
|
|
|
# npm postinstall runs grunt, which depends on files other than package.json
|
|
RUN npm run postinstall
|
|
|
|
# Build the app
|
|
RUN npm run build
|
|
|
|
#########################################
|
|
# Package static build files into nginx #
|
|
#########################################
|
|
FROM nginxinc/nginx-unprivileged:stable-alpine@sha256:37f356a5eba5d187365b4f59cd6cc29f1f922ad18146d554b576a80983377e6a AS cyberchef
|
|
|
|
LABEL maintainer="GCHQ <oss@gchq.gov.uk>"
|
|
|
|
COPY --from=builder /app/build/prod /usr/share/nginx/html/
|