diff --git a/Dockerfile b/Dockerfile index 01df410b..f5479827 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,16 @@ -FROM golang:latest AS builder +FROM golang:alpine AS builder -ADD . /go/src/github.com/ochinchina/supervisord -RUN go get -v -u github.com/ochinchina/supervisord && go build -o /usr/local/bin/supervisord github.com/ochinchina/supervisord +RUN apk update && \ + apk add git + +# uncomments this if golang.org is not accessible +#RUN mkdir -p $GOPATH/src/golang.org/x && \ +# cd $GOPATH/src/golang.org/x && \ +# git clone https://github.com/golang/crypto && \ +# git clone https://github.com/golang/sys + +RUN go get -v -u github.com/ochinchina/supervisord && \ + go build -o /usr/local/bin/supervisord github.com/ochinchina/supervisord FROM alpine:latest