google / shipshape

Program analysis platform
Apache License 2.0
269 stars 35 forks source link

Problem running shipshape in docker container #44

Closed emsod closed 9 years ago

emsod commented 9 years ago

amshali got this warning:

shipshape --categories="JSHint" /tmp/test.js WARNING: Analyzer Driver setup failed to run: chdir /shipshape-workspace/tmp: no such file or directory E0611 17:59:09.468988 1095 shipshape.go:227] Error making service call: received an error from calling run: chdir /shipshape-workspace/tmp: no such file or directory

To run docker in docker we need to (at least) pass a --privileged flag. The suggested solution is to add a --dind flag to the shipshape cli.

emsod commented 9 years ago

After testing around a container building on cloud-dev-java with go installed, there is a problem with the unix socket used for communication. Using a tcp socket instead may solve this problem. The jenkins plugin has run successfully inside the cloud-dev-java container in the past and may have a solution in it that can be ported to the CLI.

emsod commented 9 years ago

My previous problem was due to me replacing the endpoint script in cloud-dev-java by mistake. This caused the docker to not be setup correctly. This has now been resolved.

https://phabricator-dot-shipshapecode.appspot.com/D33 adds a dind test for the shipshape cli. This CLI passes the test without encountering the initial problem in this issue thread.

emsod commented 9 years ago

The problem here has to do with mapped volumes which is tracked in issue #52, and this issue has been resolved and pushed out in the latest release.