diff --git a/Dockerfile.migrate b/Dockerfile.migrate index dd14328..f761232 100644 --- a/Dockerfile.migrate +++ b/Dockerfile.migrate @@ -1,10 +1,14 @@ # Migration Engine - Database Migration Tool # Multi-stage build to compile with CGO support -ARG TARGETOS=linux -ARG TARGETARCH=amd64 # Build stage -FROM --platform=$TARGETOS/$TARGETARCH golang:1.25-alpine AS builder +# Let buildx handle platform automatically +FROM golang:1.25-alpine AS builder + +# Get build platform from buildx +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH # Install build dependencies for CGO RUN apk add --no-cache \ diff --git a/Dockerfile.scanner b/Dockerfile.scanner index bdb6f8d..c10a367 100644 --- a/Dockerfile.scanner +++ b/Dockerfile.scanner @@ -1,10 +1,14 @@ # Scanning Engine - Background Scanner Worker # Multi-stage build to compile with CGO support -ARG TARGETOS=linux -ARG TARGETARCH=amd64 # Build stage -FROM --platform=$TARGETOS/$TARGETARCH golang:1.25-alpine AS builder +# Let buildx handle platform automatically +FROM golang:1.25-alpine AS builder + +# Get build platform from buildx +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH # Install build dependencies for CGO RUN apk add --no-cache \ diff --git a/Dockerfile.server b/Dockerfile.server index cf02455..fdf6fdd 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -1,10 +1,14 @@ # Application Engine - GoHoarder Server # Multi-stage build to compile with CGO support -ARG TARGETOS=linux -ARG TARGETARCH=amd64 # Build stage -FROM --platform=$TARGETOS/$TARGETARCH golang:1.25-alpine AS builder +# Let buildx handle platform automatically +FROM golang:1.25-alpine AS builder + +# Get build platform from buildx +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH # Install build dependencies for CGO RUN apk add --no-cache \