docker-machine-driver-qemu
docker-machine-driver-qemu copied to clipboard
Can't connect
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
test0 - qemu Running tcp://127.0.0.1:2376 Unknown Unable to query docker version: Cannot connect to the docker engine endpoint
$ docker -H tcp://127.0.0.1:2376 ps
Cannot connect to the Docker daemon at tcp://127.0.0.1:2376. Is the docker daemon running?
But docker-machine ssh test0 works fine! Thanks! [I installed all with brew, but this package i had built]
It works after the second try
Fixed after docker-machine provision test0
Presumably something went wrong when starting docker after the first "start", but hard to tell without the logs. It seems unlikely that tcp://127.0.0.1:2376 is a valid response.*.. Glad that it worked out in the end!
- Since that would conflict both with the host docker (if any) and the second machine created, this driver is running docker on a random port instead. For this to work smoothly, docker-machine needs a patch:
https://github.com/docker/machine/pull/4034
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - qemu Running tcp://127.0.0.1:35280 v18.06.1-ce
But it should still work with the default machine version, even though you will get a bogus printout like:
Setting Docker configuration on the remote daemon...
This machine has been allocated an IP address, but Docker Machine could not
reach it successfully.
SSH for the machine should still work, but connecting to exposed ports, such as
the Docker daemon port (usually <ip>:2376), may not work properly.
You may need to add the route manually, or use another related workaround.
This could be due to a VPN, proxy, or host file configuration issue.
You also might want to clear any VirtualBox host only interfaces you are not using.
Checking connection to Docker...
Docker is up and running!
(it didn't get a public IP and it isn't running on 2376, which unfortunately had been hard-coded)