Skip to content

Instantly share code, notes, and snippets.

@medicalwei
Last active January 19, 2020 18:16
Show Gist options
  • Save medicalwei/78fb1404231af7123709c17f059eb112 to your computer and use it in GitHub Desktop.
Save medicalwei/78fb1404231af7123709c17f059eb112 to your computer and use it in GitHub Desktop.
Example Dockerfile with Glide
FROM golang:1.8
RUN curl https://glide.sh/get | sh
ENV PKG_NAME=github.com/medicalwei/some-project
ENV PKG_PATH=$GOPATH/src/$PKG_NAME
WORKDIR $PKG_PATH
COPY glide.yaml glide.lock $PKG_PATH/
RUN glide install
COPY . $PKG_PATH
RUN go build && go install
WORKDIR $PKG_PATH
EXPOSE 9487
CMD ["some-project"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment