mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-10 00:14:38 +00:00
fix(docker): force amd64 platform for build stages to avoid QEMU timeout
The multi-arch Docker build was timing out after 1 hour because the backend-builder stage was running under QEMU emulation for arm64. Building 31 Go binaries under QEMU is extremely slow. Since Go cross-compiles all target architectures anyway, and the frontend build produces platform-independent JS, there's no need to run these stages under QEMU. Force them to linux/amd64 and let Go handle cross-compilation natively. Only the runtime stages need to be multi-arch (for the correct Alpine base image and binary selection).
This commit is contained in:
parent
fc6d6d22d3
commit
f4cf28e75d
1 changed files with 5 additions and 2 deletions
|
|
@ -3,7 +3,8 @@ ARG BUILD_AGENT=1
|
|||
ARG PULSE_LICENSE_PUBLIC_KEY
|
||||
|
||||
# Build stage for frontend (must be built first for embedding)
|
||||
FROM node:20-alpine AS frontend-builder
|
||||
# Force amd64 platform to avoid slow QEMU emulation during multi-arch builds
|
||||
FROM --platform=linux/amd64 node:20-alpine AS frontend-builder
|
||||
|
||||
WORKDIR /app/frontend-modern
|
||||
|
||||
|
|
@ -20,7 +21,9 @@ RUN --mount=type=cache,id=pulse-npm-cache,target=/root/.npm \
|
|||
npm run build
|
||||
|
||||
# Build stage for Go backend
|
||||
FROM golang:1.24-alpine AS backend-builder
|
||||
# Force amd64 platform - Go cross-compiles for all targets anyway,
|
||||
# and this avoids slow QEMU emulation during multi-arch builds
|
||||
FROM --platform=linux/amd64 golang:1.24-alpine AS backend-builder
|
||||
|
||||
ARG BUILD_AGENT
|
||||
ARG PULSE_LICENSE_PUBLIC_KEY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue