Search code examples
jenkinsdockerboot2dockerdockerpy

How to run Docker to listen on a specific port to integrate with Jenkins


I am trying to use Jenkins Docker plugin. Unfortunately I am not able to run Docker on RHEL to listen on a specific port yet.

I know I have to add:

DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock"

But in my RHEL installation dont find the /etc/init/docker.conf file.

So which file to modify?


Solution

  • Try to edit /etc/systemd/system/docker.service like below.

    ExecStart=/usr/bin/docker -H fd:// -H 0.0.0.0:4243 -d