January 10, 2017

[SOLVED]Docker API connection refused

Create a file called /etc/systemd/system/docker-tcp.socket to make Docker available on a TCP socket on port 2375.

Description=Docker Socket for the API



Then enable this new socket:

systemctl enable docker-tcp.socket
systemctl stop docker
systemctl start docker-tcp.socket
systemctl start docker
Test that it's working:

docker -H tcp:// ps

Source: https://coreos.com/os/docs/latest/customizing-docker.html

1 comment:

  1. Thanks a lot for sharing this code, I will try to use it in future for sure. But sometimes I have to use the help of the software team http://www.nixsolutions.com/departments/php/ to solve all the problem which may appear during the development of my projects.