Skip to content

Instantly share code, notes, and snippets.

@webdev
Created December 9, 2016 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdev/c7279a9fd9fb63337616029277b6ddab to your computer and use it in GitHub Desktop.
Save webdev/c7279a9fd9fb63337616029277b6ddab to your computer and use it in GitHub Desktop.
Go docker
# golang image where workspace (GOPATH) configured at /go.
FROM golang:latest
# Copy the local package files to the container's workspace.
ADD . /go/src/github.com/webdev/golang-docker
# Build the golang-docker command inside the container.
RUN go install github.com/webdev/golang-docker
# Run the golang-docker command by default when the container starts.
ENTRYPOINT /go/bin/golang-docker
# http server listens on port 8080.
EXPOSE 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment