cyberchef/Dockerfile
dependabot[bot] cd6bb1bed5
chore (deps): bump nginxinc/nginx-unprivileged
Bumps the docker-dependencies group with 1 update: nginxinc/nginx-unprivileged.


Updates `nginxinc/nginx-unprivileged` from `fd3314e` to `ee7b7bc`

---
updated-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>
2026-07-10 02:05:51 +00:00

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:a0b9bf06e4e6193cf7a0f58816cc935ff8c2a908f81e6f1a95432d679c54fbfd 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:ee7b7bc02a4af72c98d4365151f92d9b380c482c48d8c84bbbe44bd3192ba463 AS cyberchef
LABEL maintainer="GCHQ <oss@gchq.gov.uk>"
COPY --from=builder /app/build/prod /usr/share/nginx/html/