raintank / raintank-docker

raintank docker images and dev stack DEPRECATED / UNMAINTAINED
https://blog.raintank.io/docker-based-development-environment/
16 stars 4 forks source link

Build grafana/Dockerfile fails on godep restore #49

Open joaopedrotaveira opened 9 years ago

joaopedrotaveira commented 9 years ago

Build of grafana Dockerfile fails on:

RUN godep restore
package github.com/aws/aws-sdk-go/internal/endpoints
    imports github.com/aws/aws-sdk-go/internal/endpoints
    imports github.com/aws/aws-sdk-go/internal/endpoints: cannot find package "github.com/aws/aws-sdk-go/internal/endpoints" in any of:
    /root/.gvm/gos/go1.4/src/github.com/aws/aws-sdk-go/internal/endpoints (from $GOROOT)
    /tmp/gopath.N6U4vx/src/github.com/aws/aws-sdk-go/internal/endpoints (from $GOPATH)
godep: restore: exit status 1
(...)

Possible fix/workaround: https://github.com/kubernetes/kubernetes/issues/16238

I manage to keep process going:

diff --git a/grafana/Dockerfile b/grafana/Dockerfile
index b80319a..5779736 100644
--- a/grafana/Dockerfile
+++ b/grafana/Dockerfile
@@ -14,6 +14,10 @@ ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
 RUN go get -insecure github.com/raintank/grafana || true
 RUN go get github.com/Unknwon/bra
 RUN go get github.com/tools/godep
+RUN rm -rf ${GOPATH}/src/github.com/aws/aws-sdk-go/
+RUN go get github.com/aws/aws-sdk-go
+WORKDIR /go/src/github.com/aws/aws-sdk-go
+RUN git checkout v0.9.9
 WORKDIR /go/src/github.com/grafana/grafana
 RUN go run build.go setup
 RUN godep restore

BR, JP