diff --git a/Dockerfile b/Dockerfile index d05c839..3859d1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,8 @@ RUN go mod download 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 . # Create a minimal runtime image