Skip to content

Commit

Permalink
Use copy & build instead of go get
Browse files Browse the repository at this point in the history
  • Loading branch information
mingrammer committed Apr 27, 2019
1 parent 63eeacd commit feae212
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM golang
ENV CGO_ENABLED=0
RUN go get github.com/mingrammer/flog
ENV GO111MODULE=on
COPY . $GOPATH/src/github.com/flog
WORKDIR $GOPATH/src/github.com/flog
RUN go build -mod=vendor

FROM scratch
COPY --from=0 /go/bin/flog /bin/flog
COPY --from=0 /go/src/github.com/flog/flog /bin/flog
ENTRYPOINT ["flog"]

0 comments on commit feae212

Please sign in to comment.