I’m exploring how to move a multi container project using docker-compose to a more distributed solution and while doing so, my first step was testing docker-machine (0.5.0 (04cfa58)) to try and address remote docker daemons via ssh…
While I’m able to use the VirtualBox driver to spin up a “local” boot2docker instance, I’m unable to connect via the generic driver to a normal full fledged remote Ubuntu host.
Here is what I’m getting:
(I can ssh to 192.168.10.10 as root no problem with ssh keys)
>docker-machine create --driver generic --generic-ip-address 192.168.10.10 --generic-ssh-user root --generic-ssh-key ~/.ssh/id_rsa test
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Detecting operating system of created instance...
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Provisioning created instance...
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Copying certs to the local machine directory...
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Copying certs to the remote machine...
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Setting Docker configuration on the remote daemon...
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Enter passphrase for key '/home/user/.docker/machine/machines/test/id_rsa':
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded
But it does seem to eventually create something in /etc/docker/, even though I have to paste the password so many times (so they’re all correct tries!), but nothing much else (beside changing hosts and hostname if I don’t put the machine’s current hostname).
or
>docker-machine --native-ssh create --driver generic --generic-ip-address 192.168.10.10 --generic-ssh-user root --generic-ssh-key ~/.ssh/id_rsa test
Running pre-create checks...
Creating machine...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
If I expose a docker daemon to a tcp port I’m also able to address it from the other machine with -H, but that’s not very secure if it’s possible …
Any idea what I’m doing wrong?
Thanks!