From ce336b4f852970e333697daf1dd724d079c07e9d Mon Sep 17 00:00:00 2001 From: Pieter Hollander Date: Thu, 8 Aug 2024 11:19:01 +0200 Subject: [PATCH] Make go build TARGETOS configurable. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3859d1c..f5c5bfa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY . . # Build the application for the specified target architecture # https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ ARG TARGETOS TARGETARCH -RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -o opendtu-logger . +RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o opendtu-logger . # Create a minimal runtime image FROM --platform=${TARGETPLATFORM} scratch