Merge pull request #1003 from 4gray/agent/docker-build-platform-stage

fix(docker): build app on native build platform
This commit is contained in:
4gray authored and GitHub committed 2026-05-22 13:27:50 +03:00
commit 615ad98566
2 files changed
+10 -1

No files matched your search

+4 -1
View File
@@ -1,4 +1,7 @@
FROM node:22-alpine AS build
# The Nx builds below emit platform-independent JS/static assets. During
# multi-arch publish builds, keep that heavy build stage on the native builder
# platform instead of running Node/Nx through QEMU for linux/arm64.
FROM --platform=$BUILDPLATFORM node:22-alpine AS build
RUN apk add --no-cache python3 make g++ git
+6
View File
@@ -49,6 +49,12 @@ pnpm nx build web --configuration=pwa
pnpm nx build web-backend
```
Those Nx builds generate platform-independent JS and static assets. In
multi-architecture CI builds, the Dockerfile runs this build stage on the native
BuildKit builder platform, then copies the generated output into each target
runtime image. That avoids running the Angular/Nx build through QEMU when
publishing `linux/amd64` and `linux/arm64` images.
## Published Docker Tags
Pull request builds validate the Dockerfile without pushing an image. Docker