Dockerfile.multistage 373 B

12345678910111213141516171819
  1. FROM golang:1.8.1-alpine as builder
  2. RUN apk add --update make
  3. RUN apk add --update git
  4. ADD . /buildme
  5. WORKDIR /buildme
  6. ENV GOPATH=/buildme/deps:/buildme
  7. RUN go get buildme/cmd/builder
  8. RUN go build -o DIST/builder buildme/cmd/builder
  9. FROM alpine
  10. COPY --from=builder /buildme/DIST/builder /builder
  11. CMD ["/builder"]
  12. # Optimize goget
  13. #RUN go get github.com/docker/docker