godep doesnt install required packages

802 Views Asked by At

I'm trying to run the application (written in Go) inside docker. To install dependencies I'm using godep. When executing godep inside docker, following error is received

 docker run -ti --rm -v $PWD:/go/src/app -p3000:3000 golang bash 
 root@7c491d184712:/go/src/app# go get github.com/tools/godep 
 root@7c491d184712:/go/src/reno# godep save 
 godep: Package (github.com/Shopify/sarama) not found
1

There are 1 best solutions below

2
On

Godep needs you to have local copies of the dependencies you want to vendor. You should run go get before running godep save. Additionally, assuming you have sub-packages in your app folder, you should run godep save ./....

Godep's readme: https://github.com/tools/godep#how-to-use-godep-with-a-new-project