From c4c87cf428209b8b50ed33cfd33c748101574355 Mon Sep 17 00:00:00 2001 From: pat-s Date: Mon, 29 Apr 2024 00:11:26 +0200 Subject: [PATCH] targetarch from buildx --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 917df28..c668cc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ ARG TARGETOS TARGETARCH RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg \ GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=1 \ - xgo -x -v --targets=linux/arm64,linux/amd64 -tags='sqlite sqlite_unlock_notify netgo' -ldflags='-s -w -extldflags "-static" -linkmode external' -out pages . + xgo -x -v --targets=${TARGETOS}/${TARGETARCH} -tags='sqlite sqlite_unlock_notify netgo' -ldflags='-s -w -extldflags "-static" -linkmode external' -out pages . # Use a scratch image as the base image for the final container, # which will contain only the built binary and the CA certificates