Skip to content

Instantly share code, notes, and snippets.

@cagdas1
Created July 23, 2019 06:58
Show Gist options
  • Save cagdas1/5c978685537b69df54aefaaa33afb4fe to your computer and use it in GitHub Desktop.
Save cagdas1/5c978685537b69df54aefaaa33afb4fe to your computer and use it in GitHub Desktop.
ECS Demo Dockerfile
# 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