Well, this turned out to be a pretty interesting quest. Below is the list of my findings and changes that will prevent the docker build from getting stuck.
-
dockerbase image that we are using doesn’t setGOROOTenvironment variable (github.com/docker-library/golang/blob/0ce80411b9f41e9c3a21fc0a1bffba6ae761825a/1.6/Dockerfile) -
govendor syncfollows this path of execution:
—> github.com/kardianos/govendor/blob/master/run/sync.go
-----> github.com/kardianos/govendor/blob/master/context/context.go#L128
-------> eventually coming down to github.com/kardianos/govendor/blob/master/context/context.go#L192
I believe that here’s where something might be happening which prevents the error to bubble up or maybe docker daemon is swallowing it (I am usingdocker-machineonOSX)
Changes to fix this:
Current Dockerfile:
RUN go get -v github.com/dgraph-io/dgraph/... && \
go build -v github.com/dgraph-io/dgraph/... && \
go test github.com/dgraph-io/dgraph/... && echo "v0.2.3"
Modified local version used for debugging:
RUN go get -v github.com/kardianos/govendor && \
go get -v github.com/dgraph-io/dgraph/...
ENV GOROOT /go
RUN cd $GOPATH/src/github.com/dgraph-io/dgraph && govendor sync
RUN go test github.com/dgraph-io/dgraph/... && echo "v0.2.3"
This seems to not get stuck and starts test suite execution (which for some reason is writing out this message -
2016/05/18 03:25:21 grpc: Conn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp 127.0.0.1:8081: getsockopt: connection refused"; Reconnecting to "127.0.0.1:8081" )
Can you please try out this change on your machine?
Once we are certain that the behavior is same on multiple machines either you or me can clean up the dockerfile and file a bug report in govendor repo/