Docker host and Jenkins on separate machines...

79 views
Skip to first unread message

Kirill Peskov

unread,
May 19, 2017, 3:20:52 AM5/19/17
to Jenkins Users
Hi All,

I'm googling already about an hour if not longer, but I really cannot
find an answer to quite simple question: "How to setup Jenkins to
connect to a Docker host (or multiple Docker hosts later on) running on
a separate machine(s)? Docs on the jenkins.io site seem to be not really
verbose about such a setup... By default Jenkins supposes to be able to
start docker containers on the same host as itself, but that's not my case.

Cheers,
Kirill

Matt Stave

unread,
May 19, 2017, 10:28:54 AM5/19/17
to Jenkins Users, kir...@paranoid.email
Did you try in "configure system" after installing the Docker plugin setting the Docker URL to something like tcp://172.16.42.43:4243

Alex Domoradov

unread,
May 19, 2017, 11:52:44 AM5/19/17
to Jenkins Users, kir...@paranoid.email
Not sure what do you mean by "By default Jenkins supposes to be able to  start docker containers on the same host as itself,".
Because we are using Jenkins with AWS ECS cluster without any problems. And our slave nodes are different EC2 instances from master node.

Kirill Peskov

unread,
May 21, 2017, 6:49:28 AM5/21/17
to Jenkins Users
On 19/05/17 17:52, Alex Domoradov wrote:
> Not sure what do you mean by "By default Jenkins supposes to be able
> to start docker containers on the same host as itself,".
> Because we are using Jenkins with AWS ECS cluster without any
> problems. And our slave nodes are different EC2 instances from master
> node.
I found the solution ;) To receive smart answers one need to ask smart
questions... My approach was not correct so I asked wrong question. I
actually meant docker setup for Pipelines... To prevent any job running
on the master itself, one need to put 0 to the filed 'Number of
executors' in the master node config. And, if the Docker Pipeline plugin
is installed, the agent on the node simply calls local docker and does
not need any additional configuration but to put jenkins user into the
docker group and correct permission to allow jenkins access to docker's
socket.

Thanks anyway!
Cheers,
Kirill
Reply all
Reply to author
Forward
0 new messages