Giter Site home page Giter Site logo

Comments (8)

pbrisbin avatar pbrisbin commented on May 22, 2024

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.

pbrisbin avatar pbrisbin commented on May 22, 2024

Relevant: https://wiki.archlinux.org/index.php/Sudo#Environment_variables

from codeclimate.

brynary avatar brynary commented on May 22, 2024

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.

pbrisbin avatar pbrisbin commented on May 22, 2024

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.

brynary avatar brynary commented on May 22, 2024

@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.

pbrisbin avatar pbrisbin commented on May 22, 2024

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.

pbrisbin avatar pbrisbin commented on May 22, 2024

#120 -- could you do me a favor and try out that branch to ensure it shows you the right message?

from codeclimate.

pbrisbin avatar pbrisbin commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.