Created
March 20, 2019 17:46
-
-
Save viveksinghggits/7a5192d508cb0ecb64fd6b89af19af11 to your computer and use it in GitHub Desktop.
Dockerfile to containerize the API
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.11 | |
RUN mkdir /go/src/app | |
ADD . /go/src/app | |
WORKDIR /go/src/app | |
#install the external dependecny that we have in the code | |
RUN go get -u github.com/gorilla/mux | |
#make the build of the app, output will be an executable file named main | |
RUN go build -o main . | |
CMD ["/go/src/app/main"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment