diff --git a/Dockerfile b/Dockerfile index 5aec9c3..20a25aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ -FROM golang AS build +FROM --platform=$BUILDPLATFORM golang AS build ARG GIT_DESC=undefined WORKDIR /go/src/github.com/Snawoot/opera-proxy COPY . . -RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC" +ARG TARGETOS TARGETARCH +RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC" ADD https://curl.haxx.se/ca/cacert.pem /certs.crt RUN chmod 0644 /certs.crt