Created
November 1, 2018 10:38
-
-
Save billglover/b7408b9262e3f70af1b2afcbf2063a64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.11.1-alpine as build | |
RUN apk add --update --no-cache ca-certificates git | |
RUN mkdir /app | |
WORKDIR /app | |
COPY . . | |
RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/app | |
FROM scratch | |
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | |
COPY --from=build /go/bin/app /go/bin/app | |
ENTRYPOINT ["/go/bin/app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment