We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38efd81 commit d028244Copy full SHA for d028244
1 file changed
Dockerfile
@@ -1,4 +1,4 @@
1
-FROM golang:1-alpine AS builder
+FROM --platform=$BUILDPLATFORM golang:1-alpine AS builder
2
3
WORKDIR /src
4
@@ -8,8 +8,8 @@ RUN go mod download
8
COPY . .
9
10
ARG VERSION=dev
11
-ARG TARGETOS=linux
12
-ARG TARGETARCH=amd64
+ARG TARGETOS
+ARG TARGETARCH
13
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
14
-trimpath \
15
-ldflags="-s -w -X main.version=${VERSION}" \
0 commit comments