Skip to content

Instantly share code, notes, and snippets.

@sunny-b
Last active January 30, 2023 03:24
Show Gist options
  • Save sunny-b/f0b6e01e0cf39cf5bb0f9df591828f6f to your computer and use it in GitHub Desktop.
Save sunny-b/f0b6e01e0cf39cf5bb0f9df591828f6f to your computer and use it in GitHub Desktop.
golang dockerfiles
FROM golang:latest
WORKDIR /src
COPY go.sum go.mod ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /bin/app .
ENTRYPOINT ["/bin/app"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment