Publish multi-platform images
This commit is contained in:
+4
-1
@@ -2,12 +2,15 @@ FROM golang:1.26 AS build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
ARG TARGETOS=linux
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags='-s -w' -o /out/alma-assignments-reporter .
|
||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -trimpath -ldflags='-s -w' -o /out/alma-assignments-reporter .
|
||||
|
||||
FROM scratch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user