Created
October 26, 2018 14:07
-
-
Save giautm/5af88783e55d7bb14fbce4fc96a014bc to your computer and use it in GitHub Desktop.
Dockerfile for Golang, using at TiKi@Ops
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-stretch as builder | |
WORKDIR /ops-golang | |
COPY . ./ | |
RUN CGO_ENABLED=0 \ | |
GOOS=linux \ | |
go build -mod=vendor -o app | |
FROM alpine:3.8 | |
WORKDIR /root/ | |
RUN apk add \ | |
ca-certificates | |
COPY --from=builder /ops-golang/app . | |
CMD ["./app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment