From ebbbe52560840db9a7cd342373cddfa186d2a05e Mon Sep 17 00:00:00 2001 From: Trey t Date: Thu, 19 Feb 2026 15:57:41 -0600 Subject: [PATCH] Fix GOARCH: build arm64 binaries to match Docker platform The Go build was targeting amd64 while docker-compose sets platform: linux/arm64, causing SIGSEGV on startup. Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ce5bed..7b4a3f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,10 +34,10 @@ RUN go mod download COPY . . # Build the API binary -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /app/api ./cmd/api +RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o /app/api ./cmd/api # Build the worker binary -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o /app/worker ./cmd/worker +RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o /app/worker ./cmd/worker # Base runtime stage for Go services FROM alpine:3.19 AS go-base