Remote Docker API unavailable

I installed boot2docker on my Windows 7 and initialized the virtual machine.
The docker works fine inside the virtual machine, but I can’t access the remote API on port 2375.
When connected to port 2376, I get the following response:

docker@boot2docker :~$ curl http://localhost:2376/containers Β§β™₯☺ ☻☻ 

According to this answer, "Boot2Docker" supports remote access to port 2375 from the host. "

I tried to learn how to configure the remote API, but articles ( 1 , 2 , 3 , 4 ) do not help me much. It would be convenient to see where remote access is configured.

By executing the following command, I get:

 docker@boot2docker :~$ ps -a -l | grep docker 1117 root /usr/local/bin/docker -d -D -g /var/lib/docker -H unix:// -H tcp://0.0.0.0:2376 --tlsverify --tlscacert=/ var/lib/boot2docker/tls/ca.pem --tlscert=/var/lib/boot2docker/tls/server.pem --tlskey=/var/lib/boot2docker/tls/serverkey .pem 1204 root sshd: docker [priv] 1206 docker sshd: docker@pts /0 1207 docker -sh 1364 docker ps -a -l 1365 docker -sh 

Accordingly, the page ports 2375 and 2376 for http and https, respectively.

+6
source share
1 answer

By default, the Docker daemon on boot2docker only activates the encrypted TLS socket (port: 2376). To use boot2docker with an unencrypted Docker socket, you must disable TLS by adding DOCKER_TLS=no to your /var/lib/boot2docker/profile inside VM2 boot2docker.

See the README boot2docker file for more details .

+8
source

Source: https://habr.com/ru/post/981008/


All Articles