Created
July 23, 2019 06:58
-
-
Save cagdas1/5c978685537b69df54aefaaa33afb4fe to your computer and use it in GitHub Desktop.
ECS Demo Dockerfile
This file contains 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
# Multi-stage layout | |
FROM golang:1.12 as builder | |
ENV GO111MODULE=on | |
WORKDIR /app | |
COPY go.mod . | |
COPY go.sum . | |
RUN go mod download | |
COPY . . | |
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build | |
FROM scratch | |
COPY --from=builder /app/api /app/ | |
EXPOSE 8080 | |
ENTRYPOINT ["/app/api"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment