- Vendor
go get github.com/gorilla/mux
godep save -r
- Build binary
docker run --rm -it -v "$GOPATH":/gopath -v "$(pwd)":/app -e "GOPATH=/gopath" -w /app golang:1.4.2 sh -c 'CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o hello'
- Build docker image
docker build -t treeder/go-hello-http .
- Run it
docker run --rm -it -p 8080:8080 treeder/go-hello-http