Source From Here
Question
I'm trying to use the Docker API to connect to docker daemon from another machine. I am able to do this command successfully:
But NOT when I use the real IP address:
Why can't I connect when using a non-local IP?
How-To
Came across a similar issue, one thing I don't see mentioned here is you need to start docker to listen to both the network and a unix socket. All regular docker (command-line) commands on the host assume the socket:
will start docker listening to any ip address on your host, as well as the typical unix socket.
Supplement
* Docker Doc - Docker Command Line - daemon
Question
I'm trying to use the Docker API to connect to docker daemon from another machine. I am able to do this command successfully:
But NOT when I use the real IP address:
Why can't I connect when using a non-local IP?
How-To
Came across a similar issue, one thing I don't see mentioned here is you need to start docker to listen to both the network and a unix socket. All regular docker (command-line) commands on the host assume the socket:
will start docker listening to any ip address on your host, as well as the typical unix socket.
Supplement
* Docker Doc - Docker Command Line - daemon
沒有留言:
張貼留言