By default the Docker service listens on a local socket. If you want to access the Docker service api remotely, you need to configure the service to listen on a port as well.
On Ubuntu 16.04, edit /lib/systemd/system/docker.service and change this line:
ExecStart=/usr/bin/dockerd -H fd://
to
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376
Reload the systemd config:
sudo systemctl daemon-reload
and restart the service:
sudo systemctl restart docker.service
More info here.