File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.18 -alpine as builder
1+ FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19 -alpine as builder
22
33ARG TARGETPLATFORM
44ARG BUILDPLATFORM
@@ -18,10 +18,8 @@ COPY go.mod .
1818
1919RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go test -mod=vendor $(go list ./... | grep -v /vendor/) -cover
2020
21- # add user in this stage because it cannot be done in next stage which is built from scratch
22- # in next stage we'll copy user and group information from this stage
23- RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -mod=vendor -ldflags "-s -w -X main.GitCommit=${GitCommit} -X main.Version=${Version}" -a -installsuffix cgo -o /usr/bin/license-check \
24- && addgroup -S app \
21+ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -mod=vendor -ldflags "-s -w -X main.GitCommit=${GitCommit} -X main.Version=${Version}" -o /usr/bin/license-check
22+ RUN addgroup -S app \
2523 && adduser -S -g app app
2624
2725FROM scratch
You can’t perform that action at this time.
0 commit comments