From 2deeaaf97ee51a2c2794db4214aed75ceff2b84b Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 6 Dec 2025 01:28:03 +0100 Subject: [PATCH] Enable docker cross compile for front & auth --- auth/Dockerfile | 4 ++-- front/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/Dockerfile b/auth/Dockerfile index 5da5144a..fe4c6fb3 100644 --- a/auth/Dockerfile +++ b/auth/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.25 AS build +FROM --platform=$BUILDPLATFORM golang:1.25 AS build WORKDIR /app COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN CGO_ENABLED=0 GOOS=linux go build -o /keibi +RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=$TARGETARCH go build -o /keibi FROM gcr.io/distroless/base-debian11 WORKDIR /app diff --git a/front/Dockerfile b/front/Dockerfile index e0d53f86..1f0910a7 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun AS builder +FROM --platform=$BUILDPLATFORM oven/bun AS builder WORKDIR /app # https://github.com/oven-sh/bun/issues/24538