Skip to content

Instantly share code, notes, and snippets.

@viveksinghggits
Created March 20, 2019 17:46
Show Gist options
  • Save viveksinghggits/7a5192d508cb0ecb64fd6b89af19af11 to your computer and use it in GitHub Desktop.
Save viveksinghggits/7a5192d508cb0ecb64fd6b89af19af11 to your computer and use it in GitHub Desktop.
Dockerfile to containerize the API
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