Jenkins and docker: uri was not specified
Solution 1:
With jenkins version of 2.51
and docker version 1.13.1
, you can do the following to solve this issue. First add the following to the ExecStart
(in docker.service
):
ExecStart=/usr/bin/dockerd -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock
And then go to Jenkins -> Manage Jenkins -> Configure system -> Docker builder. Here you specify:
tcp://127.0.0.1:4243
as Docker URL. Apply and Test connection.
Solution 2:
Docker-build-step plugin doesn't use local docker installation automatically.
* You have to configure it manually *
As mentioned in some other answers you don't need to do the voodoo of enabling tcp for docker endpoint you can simply use the socket path.
In Manage Jenkins/Configure System/Docker Builder
You will see that the Docker URL option is left blank. Fill it with the unix socket url unix:///var/run/docker.sock
. That should solve the issue.