I am trying to connect to a docker daemon on a different machine. I have to VM A and B. I want to run the daemon on VM A and connect to it from VM B.
For now, I’m not interested in setting-up TLS, or anything like that.
If I launch the daemon on VM B using this:
dockerd -H tcp://0.0.0.0:2375
And then try to talk to it from VM A:
curl x.x.x.x:2375/version
docker -H tcp://x.x.x.x:2375 ps
It just hangs for some time and then throw an error.
But if I launch a daemon inside a docker on VM B:
# Start the docker on the standard socket:
dockerd
docker run --privileged -p 2375:2375 docker:dind dockerd -H tcp://0.0.0.0:2375
I can communicate with it from VM A without issue:
curl x.x.x.x:2375/version # Ok
docker -H tcp://x.x.x.x:2375 ps # Ok
Is there any reason why I could not connect to the daemon when started directly from the VM?