Hello, I'm running jenkins as a non-root user and am attempting to use a docker agent in my jenkinsfile. When I run the job, I get the following error: ~~~~ [VA_Build_containers_develop-NJECFMY5Y6Z5OKTQVWTCSYEZEVQKAXGGRGECV2LSFA2YZ2ALBWQQ] Running shell script + docker inspect -f . docker:1.12.6 . Failed to run image 'docker:1.12.6'. Error: /usr/bin/docker-current: Cannot connect to the Docker daemon. Is the docker daemon running on this host?. See '/usr/bin/docker-current run --help'. ~~~
The root cause of course is that docker is running as root and jenkins is not. The "solution" I've found on the internet is to open up permissions to the world on the docker.sock or to add a tcp connecter to docker. While that may functionally get me what I want that is a hack not a best practice solution IMHO. I want to tell Jenkins docker agent to execute docker via sudo (as I've given the jenkins user all required permissions via sudoers) but I can't figure out how. Is there any way to currently do this or is this a feature request. Thanks in advance, -Dan -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAErRXL-EUOsLn9OAZ3xq8zQgmAZcXSpZWRSqzEBScecgwkoEDA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
