File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 1- # Obtain latest ca-certificates
2- FROM alpine:latest as certs
3- RUN apk --update add ca-certificates
1+ FROM golang:alpine AS builder
2+ ARG VERSION
3+
4+ RUN apk update && apk add --no-cache git ca-certificates && update-ca-certificates
5+
6+ WORKDIR $GOPATH/src/semantic-release
7+ COPY . .
8+
9+ RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a --installsuffix cgo -ldflags="-extldflags \' -static\' -s -w -X main.SRVERSION=$VERSION" -o /go/bin/semantic-release ./cmd/semantic-release/
10+
411
512FROM scratch
6- ADD out/semantic-release /usr/local/bin/release
7- COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
8- CMD ["release" ]
13+
14+ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
15+ COPY --from=builder /go/bin/semantic-release /
16+
17+ ENTRYPOINT ["/semantic-release" ]
You can’t perform that action at this time.
0 commit comments