Linux running systemd, like Ubuntu 16.04, adding -H tcp://0.0.0.0:2375
to /etc/default/docker
does not have the effect it used to.
Instead, create a file called /etc/systemd/system/docker-tcp.socket
to make docker available on a TCP socket on port 4243:
[Unit]
Description=Docker Socket for the API
[Socket]
ListenStream=4243
Service=docker.service
[Install]
WantedBy=sockets.target
Then enable the new socket:
systemctl enable docker-tcp.socket
systemctl enable docker.socket
systemctl stop docker
systemctl start docker-tcp.socket
systemctl start docker
Now, verify if Remote API is working:
curl -X GET http://localhost:4243/images/json