0

I have a golang app inside my-app (cloned git repo). The folder myapp is on the same place as my Dockerfile. I copy my project in it. Here is my dockerfile:

FROM golang:1.7
RUN go get github.com/tools/godep
ADD priv/.netrc /root/.netrc

WORKDIR /go/src/my-app
ADD ./my-app .

RUN godep restore -v

Now the godep restore -v is failing. A lot of repo's are restored well, some are skipped:

godep: Restoring dependency ..
godep: Restoring dependency (if needed): github.com/xxx
godep: Skipping already restored repo

It works all fine till the moment it need to restore dependencies which are inside the my-app repo?

godep: Dep (github.com/otherrepo/random/random) restored, but was unable to load it with error:
    Package (github.com/my-name/my-app/subpath)  not found

The path exist (on every branch). When I cd inside my-app I can see the subpath folder and I can also visit it on github:

https://github.com/my-name/my-repo/tree/branch/subpath

What am I missing or what is going wrong?

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
DenCowboy
  • 13,884
  • 38
  • 114
  • 210

1 Answers1

0

Looks like you don't have setup GOPATH inside Docker container

Oleh Herych
  • 897
  • 1
  • 9
  • 16