Last active
November 21, 2018 20:06
-
-
Save vcabbage/6d4e56676ee9c840b6d0fb192b139999 to your computer and use it in GitHub Desktop.
Multi-stage Dockerfile
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:alpine AS build | |
ADD . /go/src/github.com/my/project | |
WORKDIR /go/src/github.com/my/project | |
RUN go build -o /mybinary ./cmd/mybinary | |
FROM alpine:latest | |
RUN apk add --no-cache ca-certificates | |
COPY --from=build /mybinary /mybinary | |
ENTRYPOINT ["/mybinary"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment