Skip to content

Instantly share code, notes, and snippets.

@shashank404error
Last active October 27, 2020 08:48
Show Gist options
  • Save shashank404error/9806fb4d6cb0f89256e60d402310c8f9 to your computer and use it in GitHub Desktop.
Save shashank404error/9806fb4d6cb0f89256e60d402310c8f9 to your computer and use it in GitHub Desktop.
Dockerfile for go server app
FROM golang:latest
LABEL maintainer="your name <YOURNAME@example.com>"
WORKDIR /app
COPY go.mod ./
RUN go mod download
COPY . .
RUN go build -o demo
EXPOSE 80
CMD ["./demo"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment