File tree Expand file tree Collapse file tree 2 files changed +26
-5
lines changed
Expand file tree Collapse file tree 2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change 6161 tags : ${{ steps.image-metadata.outputs.tags }}
6262 labels : ${{ steps.image-metadata.outputs.labels }}
6363 containerfiles : ./Dockerfile
64- platforms : linux/amd64
64+ platforms : linux/amd64,linux/arm64,linux/arm/v7
6565 oci : true
6666 # Webpack seems to use a lot of open files, increase the max open file limit to accomodate.
6767 extra-args : |
Original file line number Diff line number Diff line change 1- FROM node:18-alpine AS build
1+ # ####################################
2+ # Build the app to a static website #
3+ # ####################################
4+ # Modifier --platform=$BUILDPLATFORM limits the platform to "BUILDPLATFORM" during buildx multi-platform builds
5+ # This is because npm "chromedriver" package is not compatiable with all platforms
6+ # For more info see: https://docs.docker.com/build/building/multi-platform/#cross-compilation
7+ FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
28
9+ WORKDIR /app
10+
11+ COPY package.json .
12+ COPY package-lock.json .
13+
14+ # Install dependencies
15+ # --ignore-scripts do not run grunt postinstall script as it depends on files other than package.json
16+ RUN npm ci --ignore-scripts
17+
18+ # Build the app
319COPY . .
4- RUN npm ci
20+
21+ # npm postinstall runs grunt, which depends on files other than package.json
22+ RUN npm run postinstall
523RUN npm run build
624
7- FROM nginx:1.25-alpine3.18 AS cyberchef
25+ # ########################################
26+ # Package static build files into nginx #
27+ # ########################################
28+ FROM nginx:stable-alpine AS cyberchef
829
9- COPY --from=build . /build/prod /usr/share/nginx/html/
30+ COPY --from=builder /app /build/prod /usr/share/nginx/html/
You can’t perform that action at this time.
0 commit comments