I'm trying to access Docker remote API from within a container because I need to start other containers.
The host address is 172.19.0.1
, so I'm using http://172.19.0.1:2375/images/json
to get the list of images (from host, http://localhost:2375/images/json
works as expected.
The connection is refused, I guess because Docker (for Windows) listens on 127.0.0.1
and not on 0.0.0.0
.
I've tried to change configuration (both from UI and daemon.json
) adding the entry:
"hosts": ["tcp://0.0.0.0:2375"]
but the daemon fails to start. How can I access the api?