Last active
January 19, 2020 18:16
-
-
Save medicalwei/78fb1404231af7123709c17f059eb112 to your computer and use it in GitHub Desktop.
Example Dockerfile with Glide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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