Get Adobe Flash player

In Docker to allow Docker clients to access the Docker server (daemon) over the network you have to switch the Docker daemon from using a local socket to a tcp port.

 

First make sure docker is stopped:

 

$service docker stop

 

In the training I watched the command was:

 

$docker –H IPaddress:Port –d &

 

For example:

 

$docker –H 192.168.0.67:2375 –d &

 

2375 being the default non-ssl port.

 

This didn’t work for me and after digging around I found the latest syntax for this line looks like:

 

$docker daemon –H 192.168.0.67:2375 &

 

My advice though is run the daemon on both the socket and the tcp port as for testing its easier when you are on the docker host system. The command to do this is:

 

$docker daemon –H unix:///var/run/docker.sock –H 192.168.0.67:2375 &

 

You may receive an error about an existing docker.pid file that exists in /var/run . I just deleted using:

 

$rm /var/run/docker.pid

 

Then run the previous command again to fire up Docker on both socket and tcp port.

 

$docker daemon –H unix:///var/run/docker.sock –H 192.168.0.67:2375 &

One Response to Docker listening on a tcp port

Leave a Reply

Banner Adverts