mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
fix(docker): build app on native build platform
This commit is contained in:
1 parent
138d02e1c4
commit
619bcf627a
2 files changed
+10
-1
No files matched your search
+4
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user