Search code examples
dockerjenkins-docker

How to find "Docker Host URI" to be used in Jenkins "Docker Plugin"?


Is there any command which we can run and find out the "Docker Host URI"? I found some of related questions but didn't get it exactly.


Solution

  • Yes this is the docker host uri

    tcp://127.0.0.1:2375

    But before that you need to add this DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock"

    In /etc/default/docker at the end of file, then restart the docker.onec restarted docker.sock will run in 2375 and add this tcp://127.0.0.1:2375 in Jenkins