From 0bdf7cc3279e8ff48292ae8959d053f2c3a9be83 Mon Sep 17 00:00:00 2001 From: Norman Gehrsitz <45375059+ngehrsitz@users.noreply.github.com> Date: Fri, 9 Feb 2024 16:29:58 +0100 Subject: [PATCH] Set $TARGETPLATFORM explicitly https://github.com/docker/build-push-action/issues/820#issuecomment-1486849546 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 237667e67..5ea913434 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -a -installsuffix cgo -o swag cmd/swag/ ######## Start a new stage from scratch ####### -FROM scratch +FROM --platform=$TARGETPLATFORM scratch WORKDIR /code/