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 <noreply@anthropic.com>
This commit is contained in:
@@ -34,10 +34,10 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build the API binary
|
# 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
|
# 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
|
# Base runtime stage for Go services
|
||||||
FROM alpine:3.19 AS go-base
|
FROM alpine:3.19 AS go-base
|
||||||
|
|||||||
Reference in New Issue
Block a user