Created
July 5, 2018 19:44
-
-
Save mlabouardy/ad1b8b05b3619523fdd4ab4cc00c9c7c to your computer and use it in GitHub Desktop.
Dockerfile to build a Golang based application image
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.10 | |
WORKDIR /go/src/github.com/mlabouardy/lambda-oneshot-container | |
COPY main.go . | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . | |
FROM alpine:latest | |
RUN apk --no-cache add ca-certificates | |
WORKDIR /root/ | |
COPY --from=0 /go/src/github.com/mlabouardy/lambda-oneshot-container/app . | |
CMD ["./app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment