Duh. I needed to reboot/restart, blah, blah. Jenkins maybe docker too need 
a restart. I just got mad and typed "reboot."

After the reboot, the Jenkins green circle appeared after a build.

*The success factor is this*

Make sure Jenkins is in Docker as a user

This was the key:


    sudo usermod -aG docker jenkins


Now verify


    grep ^docker /etc/group
    docker:x:120:root,jenkins


Yeah! - Jenkins is there.


25 years as a developer and I still forget to reboot.


YAMR = Yet another missing reboot
- show quoted text -

On Saturday, December 3, 2016 at 11:00:02 AM UTC-8, [email protected] wrote:
>
> Inside Pipeline this works 
>
>    sh 'docker info'
>
>
> But if I do:
>
>   sh 'python mycode.py'
>
> I get an error:
>
>     Unable to locate docker daemon
>
> I did the usermod -aG command and verified Jenkins is partof the docker 
> group.
>
> Is DOCKER_HOST missing from inside of Pipeline?
>
>     sh 'whoami'
>
> ...does reveal "Jenkins"
>
> Bottom line, docker commands work directly from Pipeline but not using the 
> "subprocess" package inside of Python.
>
> Not sure what I should try next.
>
> Thanks...
> Bruno Terkaly
>
>

-- 
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/9e722107-5962-415f-945c-5352d640f2fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to