Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Go dep in docker
FROM golang:1.7
# Set go bin which doesn't appear to be set already.
ENV GOBIN /go/bin
# build directories
RUN mkdir /app
RUN mkdir /go/src/app
ADD . /go/src/app
WORKDIR /go/src/app
# Go dep!
RUN go get -u
RUN dep ensure
# Build my app
RUN go build -o /app/main .
CMD ["/app/main"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.