Excuse me, jenkins has installed the docker plug-in, how can I view the docker URL on the remote server?

  docker, question

1.docker is installed on a remote server, jenkins is installed on a local machine, and some docker plugin is downloaded from jenkins, but it failed in configuring the remote docker URL and cannot be connected during testing.
2.
clipboard.png

Docker URL should contain a port, for example:

http://114.215.138.254:2375

Here 2375 is the tcp port that docker listens to and is not opened by default. This setting is required (take ubuntu as an example)

1. Modify docker Configuration File

sudo vim /etc/default/docker

Add the following:

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

2. Restart docker

sudo restart docker

Or ..

sudo service docker restart

2. View docker Port

sudo netstat -ltnp | grep docker
 tcp6       0      0 :::2375                 :::*                    LISTEN      6112/docker

Warning:It is very unsafe to open the tcp port on which docker listens, and you have exposed the IP address of the host. Please set up a firewall!