Skip to content

Instantly share code, notes, and snippets.

@nabeeljaved
Forked from icambridge/Dockerfile
Created April 2, 2018 18:06
Show Gist options
  • Save nabeeljaved/f580808ecb249cad9e474b6edd5a2391 to your computer and use it in GitHub Desktop.
Save nabeeljaved/f580808ecb249cad9e474b6edd5a2391 to your computer and use it in GitHub Desktop.

Revisions

  1. @icambridge icambridge created this gist Feb 4, 2017.
    18 changes: 18 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    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 github.com/golang/dep/...
    RUN dep ensure

    # Build my app
    RUN go build -o /app/main .
    CMD ["/app/main"]