#Should be called DIST generator FROM golang:1.8.1 ADD src/buildme $GOPATH/src/buildme RUN go get -v -u github.com/docker/docker # Prefetch ENV GOPATH=$GOPATH:/buildme WORKDIR $GOPATH # DEPS RUN go get -v buildme/cmd/builder # CODE TEST # RUN go test something # BUILD RUN CGO_ENABLED=0 go build -o /DIST/builder buildme/cmd/builder # ENV TEST # DIST RUN tar -cz /DIST >dist.tar.gz # Generate img #CMD cat dist.tar.gz