Comments (8)
docker version
is happy when run as your user. make install
is being executed with sudo
. I'd imagine the issue is the docker commands ran by bin/check
don't work for your root user.
Does
cd /tmp && make install PREFIX=$PWD && ./bin/codeclimate version
work?
from codeclimate.
Relevant: https://wiki.archlinux.org/index.php/Sudo#Environment_variables
from codeclimate.
You are correct that sudo docker version
errors out. Good catch.
(And, as expected, sudo DOCKER_HOST=$DOCKER_HOST DOCKER_TLS_VERIFY=$DOCKER_TLS_VERIFY docker version
works. It's the missing ENV vars that break it.)
At the very least, does this mean we should update our instructions to ask the user if sudo docker version
works?
Anyways, continuing on make install PREFIX=/tmp
seems to work. However, /tmp/bin/codeclimate version
then fails with:
$ /tmp/bin/codeclimate version
Your Docker setup does not support the codeclimate wrapper script:
> /var/run/docker.sock
We require a local Docker daemon that supports communication via the default
socket path.
Please use `docker run' to run the `codeclimate/codeclimate' image directly.
See https://github.com/codeclimate/codeclimate for more details.
This doesn't surprise me, as I remember we accepted this limitation. However, I think we could workaround this limitation in the wrapper fairly easily for people using a boot2docker/Docker machine setup (like I am). My understanding of the issue with the wrapper is around volume mounting... however, in the case of Docker machine, there is a shared filesystem between the Mac and the VM running Docker. So, I think we'd need something like a CODECLIMATE_VOLUME_PATH
environment variable, and then we could tweak the --volume
options we send to Docker appropriately, and things would just work.
That can/should be a separate issue/PR, but what do you think about updating the bin/check
error output to help avoid this tripping someone else up?
from codeclimate.
what do you think about updating the bin/check error output
I think we could update it to be more helpful, but just saying "sudo docker version" is too naive as we can't know if it was run with sudo
when it failed or not. Something like "ensure docker version
works for the XYZ user" we could do though, and hopefully seeing "for the root user" would be enough to get people going?
from codeclimate.
@pbrisbin if ran as root
can we insert sudo
into the help text, but not if it is not run as root?
That should be easy/simple/quick and I don't think the edge case of root-without-sudo
is particularly worth worrying about
from codeclimate.
I don't think the edge case of root-without-sudo is particularly worth worrying about
I guess I (slightly) disagree here, but if that's how you feel, then I'm OK with it.
from codeclimate.
#120 -- could you do me a favor and try out that branch to ensure it shows you the right message?
from codeclimate.
That can/should be a separate issue/PR, but what do you think about updating the bin/check error output to help avoid this tripping someone else up?
Closing this -- when we get some time, let's open that separate issue to discuss. For a standard boot2docker/docker-machine setup, we expect everything to work, so I'm curious what's different about yours that it doesn't.
from codeclimate.
Related Issues (20)
- [Question] Atom plugin for Windows
- Dockerimage - 0.86.0 "No such file or directory" HOT 5
- Include latest RuboCop channels in engines.yml HOT 1
- Codeclimate is throwing security issue for AWS Lambda ephemeral storage
- Support for Golang seems to be unmaintained HOT 1
- add engine for salt-lint
- Cppcheck --inline-suppr flag not present HOT 1
- Reek configuration custom location HOT 1
- Feature request: Plugin to detect secret sprawl
- CppCheck report a huge input error when scan big c++ repo
- Publish pipeline failed for version 0.93
- CONTAINER_TIMEOUT_SECONDS not honored? HOT 1
- ImagePullFailure error
- Please release sonar-java-7-2
- HTML output add severity field
- [Feature Request] forced color output for text format
- Add libyear support
- Upgrade standardrb support
- Reek plugin is executed under ruby-2.6 with parser-3.2.1.0
- Support for C# Asp.net MVC project on .net framework 4.8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeclimate.