Running Jenkins on Docker and using docker-plugin #206

Closed
fcoelho opened this Issue Apr 17, 2015 · 22 comments

Comments

Projects
None yet
@fcoelho

fcoelho commented Apr 17, 2015

I'm running Jenkins on Docker using the official image from the Docker Hub, and I'm trying to use the docker-plugin to connect to containers running on the same Docker host as the Jenkins server.

Since the docker-plugin can't yet connect to a unix socket, I'm running socat on the Jenkins container to proxy a local TCP socket to the volume-mounted /var/run/docker.sock. That means the Jenkins server connects to localhost:4243, but the real Docker host is on, say, 10.0.0.5.

When a new container is created, port 22 is exposed to 0.0.0.0:48349 (some random port), to which Jenkins then tries to connect. But the problem is that Jenkins is trying to connect to localhost:48349, and obviously failing since localhost for the Jenkins server is a different network than localhost for the Docker server.

I'd like to achieve two things, if possible:

  • Have Jenkins create the containers but not expose any ports outside of the container
  • Have Jenkins connect to the container's IP directly, not through localhost or other settings, i.e., I want Jenkins to connect to (for example) 172.17.0.20:22 (which is why I don't want it to expose any ports - there's simply no need for it in my case)

Is this possible with any current version of the docker-plugin? I tried fiddling with a few settings but it doesn't seem like it is possible to ignore the exposed port setting and #200 deals with a similar though different issue.

@KostyaSha KostyaSha closed this Apr 17, 2015

@fcoelho

This comment has been minimized.

Show comment
Hide comment
@fcoelho

fcoelho Apr 17, 2015

Sorry about that.

Jenkins 1.596.2
Docker-plugin: tried building from source yesterday and used the one from the build server today
Docker Server version: 1.4.1
Docker Server API version: 1.16

The hpi you linked to doesn't fix the issue, it is still trying to connect to localhost and exposing port 22 to 0.0.0.0.

Jenkins logs:

[04/17/15 16:51:42] [SSH] Opening SSH connection to localhost:49178.
Connection refused
SSH Connection failed with IOException: "Connection refused".
java.io.IOException: There was a problem while connecting to localhost:49178
    at com.trilead.ssh2.Connection.connect(Connection.java:818)
    at com.trilead.ssh2.Connection.connect(Connection.java:687)
    at com.trilead.ssh2.Connection.connect(Connection.java:587)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1146)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:354)
    at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:467)
    at com.trilead.ssh2.Connection.connect(Connection.java:758)
    ... 9 more
[04/17/15 16:51:42] Launch failed - cleaning up connection
[04/17/15 16:51:42] [SSH] Connection closed.

Docker inspect subset on the created container:

    "NetworkSettings": {
        "Bridge": "docker0",
        "Gateway": "172.17.42.1",
        "IPAddress": "172.17.0.101",
        "IPPrefixLen": 16,
        "MacAddress": "02:42:ac:11:00:65",
        "PortMapping": null,
        "Ports": {
            "22/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "49178"
                }
            ]
        }
    },

fcoelho commented Apr 17, 2015

Sorry about that.

Jenkins 1.596.2
Docker-plugin: tried building from source yesterday and used the one from the build server today
Docker Server version: 1.4.1
Docker Server API version: 1.16

The hpi you linked to doesn't fix the issue, it is still trying to connect to localhost and exposing port 22 to 0.0.0.0.

Jenkins logs:

[04/17/15 16:51:42] [SSH] Opening SSH connection to localhost:49178.
Connection refused
SSH Connection failed with IOException: "Connection refused".
java.io.IOException: There was a problem while connecting to localhost:49178
    at com.trilead.ssh2.Connection.connect(Connection.java:818)
    at com.trilead.ssh2.Connection.connect(Connection.java:687)
    at com.trilead.ssh2.Connection.connect(Connection.java:587)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1146)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:701)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:696)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:354)
    at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:467)
    at com.trilead.ssh2.Connection.connect(Connection.java:758)
    ... 9 more
[04/17/15 16:51:42] Launch failed - cleaning up connection
[04/17/15 16:51:42] [SSH] Connection closed.

Docker inspect subset on the created container:

    "NetworkSettings": {
        "Bridge": "docker0",
        "Gateway": "172.17.42.1",
        "IPAddress": "172.17.0.101",
        "IPPrefixLen": 16,
        "MacAddress": "02:42:ac:11:00:65",
        "PortMapping": null,
        "Ports": {
            "22/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "49178"
                }
            ]
        }
    },

@KostyaSha KostyaSha reopened this Apr 17, 2015

@KostyaSha

This comment has been minimized.

Show comment
Hide comment
@KostyaSha

KostyaSha Apr 17, 2015

Member

What about firewall?

Member

KostyaSha commented Apr 17, 2015

What about firewall?

@KostyaSha

This comment has been minimized.

Show comment
Hide comment
@KostyaSha

KostyaSha Apr 17, 2015

Member

@srwalter could you check?

Member

KostyaSha commented Apr 17, 2015

@srwalter could you check?

@fcoelho

This comment has been minimized.

Show comment
Hide comment
@fcoelho

fcoelho Apr 17, 2015

@KostyaSha no issues with the firewall, if I exec into the jenkins container I'm able to connect to each slave container:

[user@host ~]$ sudo docker exec -it jenkins_container bash
root@989e6ef3fa5e:/# ssh jenkins@172.17.0.106
The authenticity of host '172.17.0.106 (172.17.0.106)' can't be established.
ECDSA key fingerprint is 70:9d:ae:ad:22:0c:4c:b3:ef:bf:71:e5:f5:88:95:60.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.17.0.106' (ECDSA) to the list of known hosts.
jenkins@172.17.0.106's password: 
Linux minas-morgul 3.16.5-gentoo #1 SMP Fri Oct 24 15:50:40 PDT 2014 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Apr 16 15:36:13 2015 from localhost
jenkins@64d698d2cc37:~$ 

fcoelho commented Apr 17, 2015

@KostyaSha no issues with the firewall, if I exec into the jenkins container I'm able to connect to each slave container:

[user@host ~]$ sudo docker exec -it jenkins_container bash
root@989e6ef3fa5e:/# ssh jenkins@172.17.0.106
The authenticity of host '172.17.0.106 (172.17.0.106)' can't be established.
ECDSA key fingerprint is 70:9d:ae:ad:22:0c:4c:b3:ef:bf:71:e5:f5:88:95:60.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.17.0.106' (ECDSA) to the list of known hosts.
jenkins@172.17.0.106's password: 
Linux minas-morgul 3.16.5-gentoo #1 SMP Fri Oct 24 15:50:40 PDT 2014 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Apr 16 15:36:13 2015 from localhost
jenkins@64d698d2cc37:~$ 

@davewv31

This comment has been minimized.

Show comment
Hide comment
@davewv31

davewv31 Apr 21, 2015

@fcoelho
Hi there. I'm running in a similar situation to you, but I have things working. Well, mostly working. Odd problem with spawning a container as a slave, failing, then spawning another and having it work.

Jenkins: 1.596.2
Docker Plugin: 0.9-beta1
Docker Version: 1.6 (may have had it working on 1.4.x)

Jenkins official docker image with some slight customization, running in a docker container. Started with a custom Ansible script.
Docker started with Ansible via the angstwad.docker_ubuntu role and custom vars. I have the docker_opts set up to allow tcp. This seems to create an /etc/default/docker file on the docker host machine that shows

~$more /etc/default/docker
DOCKER_OPTS="-H unix:// -H tcp://0.0.0.0:2375"

Docker Cloud Configuration

Name: dockerlocal
Docker URL: http://172.17.42.1:2375

I still think your problem is valid and could use a solution, but this may allow you to abandon localhost and get things working.

@fcoelho
Hi there. I'm running in a similar situation to you, but I have things working. Well, mostly working. Odd problem with spawning a container as a slave, failing, then spawning another and having it work.

Jenkins: 1.596.2
Docker Plugin: 0.9-beta1
Docker Version: 1.6 (may have had it working on 1.4.x)

Jenkins official docker image with some slight customization, running in a docker container. Started with a custom Ansible script.
Docker started with Ansible via the angstwad.docker_ubuntu role and custom vars. I have the docker_opts set up to allow tcp. This seems to create an /etc/default/docker file on the docker host machine that shows

~$more /etc/default/docker
DOCKER_OPTS="-H unix:// -H tcp://0.0.0.0:2375"

Docker Cloud Configuration

Name: dockerlocal
Docker URL: http://172.17.42.1:2375

I still think your problem is valid and could use a solution, but this may allow you to abandon localhost and get things working.

@KostyaSha KostyaSha added the connect label Apr 24, 2015

@KostyaSha

This comment has been minimized.

Show comment
Hide comment
@KostyaSha

KostyaSha Apr 26, 2015

Member

That means the Jenkins server connects to localhost:4243, but the real Docker host is on, say, 10.0.0.5.

This looks like a really weird use case. You can try to work with hostname or proxy 4243.

Member

KostyaSha commented Apr 26, 2015

That means the Jenkins server connects to localhost:4243, but the real Docker host is on, say, 10.0.0.5.

This looks like a really weird use case. You can try to work with hostname or proxy 4243.

@looztra

This comment has been minimized.

Show comment
Hide comment
@looztra

looztra Aug 18, 2015

Member

That's not a weird use case. The plugin currently asserts that it can connect to the slave by using the ip of what it is given as the docker host (guessed using from the docker url settings) + using the exported ssh port on the same docker host.

I'm running exactly the same use case as @fcoelho:

  • a docker host
  • a jenkins master that is a container on the docker host
  • because we don't want to open the docker daemon port to the world (unlike suggested in the plugin docs) we use a "trick": we use the socat binary to expose the docker socket as a port of the jenkins master (or of a dedicated container in my case). So the jenkins master/socat container bind mounts the /var/run/docker.sock that is exported as a tcp port in the ip/namespace of this container.
  • the docker_url settings of the plugin is then set to something like http://${docker-socat-container-ip}:2375

the current behaviour of the plugin is to try to connect to the ${docker_url.host}:${port_from_docker_inspect}...that cannot work in our setup because the ${docker_url.host} is not the really host/ip that is exporting the public ip (the inspected one).

The workaround could be to provide an option that would allow to use directly the ip:port of the slave in the docker bridge ip namespace.

For the record:

  • I'm running jenkins 1.609.2 + docker plugin version 0.11.0
    My setup uses docker-compose + a data container:
docker:
  image: rancher/socat-docker
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
jmaster:
  image: looztra/c7-jenkins-master
  volumes_from:
  - datamaster
  ports:
  - 8080:8080
  links:
  - docker
Member

looztra commented Aug 18, 2015

That's not a weird use case. The plugin currently asserts that it can connect to the slave by using the ip of what it is given as the docker host (guessed using from the docker url settings) + using the exported ssh port on the same docker host.

I'm running exactly the same use case as @fcoelho:

  • a docker host
  • a jenkins master that is a container on the docker host
  • because we don't want to open the docker daemon port to the world (unlike suggested in the plugin docs) we use a "trick": we use the socat binary to expose the docker socket as a port of the jenkins master (or of a dedicated container in my case). So the jenkins master/socat container bind mounts the /var/run/docker.sock that is exported as a tcp port in the ip/namespace of this container.
  • the docker_url settings of the plugin is then set to something like http://${docker-socat-container-ip}:2375

the current behaviour of the plugin is to try to connect to the ${docker_url.host}:${port_from_docker_inspect}...that cannot work in our setup because the ${docker_url.host} is not the really host/ip that is exporting the public ip (the inspected one).

The workaround could be to provide an option that would allow to use directly the ip:port of the slave in the docker bridge ip namespace.

For the record:

  • I'm running jenkins 1.609.2 + docker plugin version 0.11.0
    My setup uses docker-compose + a data container:
docker:
  image: rancher/socat-docker
  volumes:
  - /var/run/docker.sock:/var/run/docker.sock
jmaster:
  image: looztra/c7-jenkins-master
  volumes_from:
  - datamaster
  ports:
  - 8080:8080
  links:
  - docker
@KostyaSha

This comment has been minimized.

Show comment
Hide comment
@KostyaSha

KostyaSha Aug 25, 2015

Member

Seems it can be bypassed with JNLP slaves ;) I will try reorder priorities and release JNLP launcher as experimental after #300 and #298

Member

KostyaSha commented Aug 25, 2015

Seems it can be bypassed with JNLP slaves ;) I will try reorder priorities and release JNLP launcher as experimental after #300 and #298

@KostyaSha KostyaSha referenced this issue Aug 25, 2015

Closed

Roadmap to 1.0 #235

6 of 21 tasks complete
@jglick

This comment has been minimized.

Show comment
Hide comment
@jglick

jglick Aug 26, 2015

Member

@ndeloof and @cyrille-leclerc and @michaelneale might be interested in this request, relating to running the master in a container on the same host as the slave agents. Ideally this would work transparently under Swarm.

I am also interested in running build steps inside job-specific containers (via docker-custom-build-environment or docker-workflow) with the same host as the slave agent (running inside a generic container), but that is a different concern which probably does not need special support from the Docker plugin.

Member

jglick commented Aug 26, 2015

@ndeloof and @cyrille-leclerc and @michaelneale might be interested in this request, relating to running the master in a container on the same host as the slave agents. Ideally this would work transparently under Swarm.

I am also interested in running build steps inside job-specific containers (via docker-custom-build-environment or docker-workflow) with the same host as the slave agent (running inside a generic container), but that is a different concern which probably does not need special support from the Docker plugin.

@ndeloof

This comment has been minimized.

Show comment
Hide comment
@ndeloof

ndeloof Aug 26, 2015

Member

@jglick I'm considering something equivalent (iiuc), with a jenkins-slave specific image to provide remoting capabilities and slave rootdir as a volume, then have docker-custom-build-environment / docker-workflow run containers with --volume-from so they share workspace.

Member

ndeloof commented Aug 26, 2015

@jglick I'm considering something equivalent (iiuc), with a jenkins-slave specific image to provide remoting capabilities and slave rootdir as a volume, then have docker-custom-build-environment / docker-workflow run containers with --volume-from so they share workspace.

@michaelneale

This comment has been minimized.

Show comment
Hide comment
@michaelneale

michaelneale Aug 27, 2015

Member

@jglick @ndeloof yes I think this is a good idea. It would be nice if docker-commons could have optional support for unix domain sockets - in which case bind mounting in would be far simpler.

Could all this be demonstrated with a docker-compose.yml so people get an out-of-box experience? (it probably could with bind mounting the socket, but if a proxy is needed, probably not).

Member

michaelneale commented Aug 27, 2015

@jglick @ndeloof yes I think this is a good idea. It would be nice if docker-commons could have optional support for unix domain sockets - in which case bind mounting in would be far simpler.

Could all this be demonstrated with a docker-compose.yml so people get an out-of-box experience? (it probably could with bind mounting the socket, but if a proxy is needed, probably not).

ermshiperete added a commit to ermshiperete/docker-plugin that referenced this issue Oct 28, 2015

Allow to use unix sockets as URL (#206)
- allow to directly connect to the container without going through
  the mapped port on the host

This is useful if Jenkins itself runs as a container with the host's
Docker socket mapped[1]. To use the docker plugin in this case simply
set the Docker URL to "unix:///var/run/docker.sock".

[1] https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

ermshiperete added a commit to ermshiperete/docker-plugin that referenced this issue Oct 28, 2015

Allow to use unix sockets as URL (#206, JENKINS-23301)
- allow to directly connect to the container without going through
  the mapped port on the host

This is useful if Jenkins itself runs as a container with the host's
Docker socket mapped[1]. To use the docker plugin in this case simply
set the Docker URL to "unix:///var/run/docker.sock".

[1] https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

ermshiperete added a commit to ermshiperete/docker-plugin that referenced this issue Oct 28, 2015

Allow to use unix sockets as URL (#206, JENKINS-23301)
- allow to directly connect to the container without going through
  the mapped port on the host

This is useful if Jenkins itself runs as a container with the host's
Docker socket mapped[1]. To use the docker plugin in this case simply
set the Docker URL to "unix:///var/run/docker.sock".

[1] https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

magnayn added a commit that referenced this issue Oct 28, 2015

Merge pull request #344 from ermshiperete/sockets
Allow to use unix sockets as URL (#206, JENKINS-23301)
@smiller171

This comment has been minimized.

Show comment
Hide comment
@smiller171

smiller171 Jan 20, 2016

Has anyone gotten this working? Perhaps using JNLP sockets?

I have the slaves starting, but not connecting to them

Has anyone gotten this working? Perhaps using JNLP sockets?

I have the slaves starting, but not connecting to them

@KostyaSha

This comment has been minimized.

Show comment
Hide comment
@KostyaSha

KostyaSha Jan 20, 2016

Member

Works fine for me.

Member

KostyaSha commented Jan 20, 2016

Works fine for me.

@smiller171

This comment has been minimized.

Show comment
Hide comment
@smiller171

smiller171 Jan 20, 2016

@KostyaSha Could Are there any details of your implementation documented somewhere? I feel like it's something I'm doing, but I can't find a well documented answer. This thread is the best I have found so far.

@KostyaSha Could Are there any details of your implementation documented somewhere? I feel like it's something I'm doing, but I can't find a well documented answer. This thread is the best I have found so far.

@avblink

This comment has been minimized.

Show comment
Hide comment
@avblink

avblink Jan 21, 2016

Can someone please provide a working docker-compose.yml

Thank you

avblink commented Jan 21, 2016

Can someone please provide a working docker-compose.yml

Thank you

@KostyaSha

This comment has been minimized.

Show comment
Hide comment
@KostyaSha

KostyaSha Jan 21, 2016

Member

Just use api access without sockets, then everything should work fine. If ssh doesn't work, then try jnlp launcher. That's all.

Member

KostyaSha commented Jan 21, 2016

Just use api access without sockets, then everything should work fine. If ssh doesn't work, then try jnlp launcher. That's all.

@avblink

This comment has been minimized.

Show comment
Hide comment
@avblink

avblink Jan 21, 2016

Here is my setup:
host is running docker service on docker.sock and TCP port 4243.
If I navigate to http://127.0.0.1:4243/containers/json I see correct json output.

I spawn Jenkins container from the host and share docker.sock volume.
Within Jenkins container I install docker client.

Jenkins has there plugins installed:
authentication-tokens:1.2
docker-build-step:1.33
docker-commons:1.2

To set up docker-build-step plugin I navigate to Jenkins config and set RESP API URI to 127.0.0.1:4243. When clicking on TEST button it returns error.

Am I missing a step? Trying to set up a good behat testing framework and get stuck at this point.

Thank you for your help/advice in advance.

Alex

avblink commented Jan 21, 2016

Here is my setup:
host is running docker service on docker.sock and TCP port 4243.
If I navigate to http://127.0.0.1:4243/containers/json I see correct json output.

I spawn Jenkins container from the host and share docker.sock volume.
Within Jenkins container I install docker client.

Jenkins has there plugins installed:
authentication-tokens:1.2
docker-build-step:1.33
docker-commons:1.2

To set up docker-build-step plugin I navigate to Jenkins config and set RESP API URI to 127.0.0.1:4243. When clicking on TEST button it returns error.

Am I missing a step? Trying to set up a good behat testing framework and get stuck at this point.

Thank you for your help/advice in advance.

Alex

@smiller171

This comment has been minimized.

Show comment
Hide comment
@smiller171

smiller171 Jan 27, 2016

@avblink I got it running by talking out to the DNS address of the host instead of trying to talk up through Docker's networking stack

@avblink I got it running by talking out to the DNS address of the host instead of trying to talk up through Docker's networking stack

@machzqcq

This comment has been minimized.

Show comment
Hide comment
@machzqcq

machzqcq Apr 28, 2016

@avblink It works as @smiller171 said with DNS address of the host. However containers spun up on docker-machine cannot talk to the DNS address too. The only way this works so far for me is on a flat network. Any containers (inside VM's) or more levels deeper - I run into "shaded.org.apache.http.client" exception when "Test" is clicked on the configuration section for docker in Jenkins Configuration page.

The reason I ask if anyone has a solution and got it working in a complete docker-machine environment please ? It would really help to have a complete sandbox environment. In fact I read the below posts too and followed but no luck

https://github.com/jpetazzo/dind
http://container-solutions.com/running-docker-in-jenkins-in-docker/

machzqcq commented Apr 28, 2016

@avblink It works as @smiller171 said with DNS address of the host. However containers spun up on docker-machine cannot talk to the DNS address too. The only way this works so far for me is on a flat network. Any containers (inside VM's) or more levels deeper - I run into "shaded.org.apache.http.client" exception when "Test" is clicked on the configuration section for docker in Jenkins Configuration page.

The reason I ask if anyone has a solution and got it working in a complete docker-machine environment please ? It would really help to have a complete sandbox environment. In fact I read the below posts too and followed but no luck

https://github.com/jpetazzo/dind
http://container-solutions.com/running-docker-in-jenkins-in-docker/

@Ian-Rossi-aimtheory

This comment has been minimized.

Show comment
Hide comment
@Ian-Rossi-aimtheory

Ian-Rossi-aimtheory Dec 2, 2016

@smiller171 Would you mind saying here where in the Jenkins config you indicated the DNS address of the host? I am running the Jenkins master in a Docker container where the Jenkins slaves are "sibling" containers on the same host. So when it does an SSH to them, it needs to SSH to Docker host and not the IP address of the Jenkins master. But the "Configure System" page under "Manage Jenkins" doesn't appear to have a place where you can indicate the host to connect to, only the port.

If I choose the JNLP launcher, there is a "Tunnel Through" field where I can enter the Docker hostname, but not for the Docker SSH launcher.

So, if you can detail how you were able to 'talk out to the DNS address 'of the Docker host, I would really appreciate it. Thanks!

Ian-Rossi-aimtheory commented Dec 2, 2016

@smiller171 Would you mind saying here where in the Jenkins config you indicated the DNS address of the host? I am running the Jenkins master in a Docker container where the Jenkins slaves are "sibling" containers on the same host. So when it does an SSH to them, it needs to SSH to Docker host and not the IP address of the Jenkins master. But the "Configure System" page under "Manage Jenkins" doesn't appear to have a place where you can indicate the host to connect to, only the port.

If I choose the JNLP launcher, there is a "Tunnel Through" field where I can enter the Docker hostname, but not for the Docker SSH launcher.

So, if you can detail how you were able to 'talk out to the DNS address 'of the Docker host, I would really appreciate it. Thanks!

@ndeloof

This comment has been minimized.

Show comment
Hide comment
@ndeloof

ndeloof Sep 11, 2017

Member

closing as obsolete

Member

ndeloof commented Sep 11, 2017

closing as obsolete

@ndeloof ndeloof closed this Sep 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment