Skip to content

Instantly share code, notes, and snippets.

@vjm
Last active April 18, 2016 20:40
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 vjm/6bf457198b150dcef66690d2fda4770d to your computer and use it in GitHub Desktop.
Save vjm/6bf457198b150dcef66690d2fda4770d to your computer and use it in GitHub Desktop.
version: '2'
services:
server:
restart: always
build: .
ports:
- 80:80
# Start from a Debian image with the latest version of Go installed
# and a workspace (GOPATH) configured at /go.
FROM golang
# Copy the local package files to the container's workspace.
ADD server2 /server2
RUN chmod +x /server2
# Build the outyet command inside the container.
# (You may fetch or manage dependencies here,
# either manually or with a tool like "godep".)
# RUN go install github.com/golang/example/outyet
# Run the outyet command by default when the container starts.
ENTRYPOINT /server2
# Document that the service listens on port 8080.
EXPOSE 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment