src-d / engine-deprecated

[DISCONTINUED] Go to https://github.com/src-d/sourced-ce/
https://docs.sourced.tech/engine
Apache License 2.0
217 stars 26 forks source link

'invalid mount config for type "bind": bind source path does not exist' #205

Closed tedd4u closed 5 years ago

tedd4u commented 5 years ago

Hi - just trying to take src-d for a spin -- running into some issues. Sorry if I'm missing something obvious (entirely likely).

macOS: 10.13.6 Docker: 2.0.0.0-mac81 (29211) Engine: 18.09.0 source-d: v0.7.0

➜  engine_darwin_amd64 ./srcd init /opt/projects/quizlet
INFO[0000] starting daemon with working directory: /opt/projects/quizlet 
INFO[0001] installing "srcd/cli-daemon:v0.7.0"          
INFO[0005] installed "srcd/cli-daemon:v0.7.0"           
INFO[0007] creating srcd-cli-network docker network     

➜  engine_darwin_amd64 ./srcd web sql
INFO[0003] this is taking a while, if this is the first time you launch this web client, it might take a few more minutes while we install all the required images 
INFO[0003] installing \"bblfsh/bblfshd:v2.11.0-drivers\" 
INFO[0052] installed \"bblfsh/bblfshd:v2.11.0-drivers\" 
INFO[0052] starting bblfshd daemon                      
INFO[0054] installing \"srcd/gitbase:v0.18.0\"          
INFO[0057] installed \"srcd/gitbase:v0.18.0\"           
FATA[0057] could not start gitbase web client at port 8080: rpc error: code = Unknown desc = could not create srcd-cli-gitbase: could not create container srcd-cli-gitbase: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /opt/projects/quizlet 

➜  engine_darwin_amd64 git:(master) ✗ ~/Downloads/engine_darwin_amd64/srcd  sql "SHOW tables;"
2019/01/22 07:10:43 rpc error: code = Unknown desc = could not create srcd-cli-gitbase: could not create container srcd-cli-gitbase: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /opt/projects/quizlet
ajnavarro commented 5 years ago

Hello @tedd4u

I guess this issue is not related to gitbase but engine.

Maybe @carlosms can double check this.

carlosms commented 5 years ago

Yes, it looks like a problem with the docker initialization, managed by engine.

I'm not familiar with the way docker for mac works, but maybe there is some step missing in our docs to make sure the path used in srcd init is available to the docker VM, https://docs.docker.com/docker-for-mac/#file-sharing.

@smola can you please transfer this issue to src-d/engine?

carlosms commented 5 years ago

@se7entyse7en can you please check on your mac if a workdir in /opt/ causes the same error for you?

se7entyse7en commented 5 years ago

@carlosms I actually don't have any /opt/ folder.

se7entyse7en commented 5 years ago

@carlosms as you told me offline your guess was correct. I tried to use a directory that wasn't listed in the File Sharing section and I had the same error. After adding that directory everything worked as expected.

So @tedd4u you should be fine by simply adding /opt or /opt/projects in the File Sharing section of the preferences. On our side we need to updated the docs.