docker-machine version 0.2.0 docker version 1.6.2
I'm using docker-machine to create a machine using VirtualBox. Everything works fine but I'd like to ssh into the machine itself and I find no instructions on how to do this. I can connect to the ssh port:
ssh $(docker-machine ip dev)
But I've no idea what username / password / identity file to use.
Docker machines runs as a VirtualBox virtual machine as you're using the VirtualBox Docker Machine driver. So, it uses up your system memory (RAM). You may not want to run all the Docker machines at the same time. Instead, run only the machines you need.
You can log into docker-machine hosts by just running
docker-machine ssh default
(Using the "default" host here)
The identity files should be stored under ~/.docker/machine/machines
. If you want to log into a container (as opposed to the host), use docker exec
as suggested by user2915097.
if you really need to do it via ssh
, this is working with docker 1.8.2
init docker:
eval "$(docker-machine env default)"
get the IP from your default docker machine:
docker-machine ip default
this prints something like this out: 192.168.99.100
ssh [email protected]
password is tcuser
but you can also use the identity file, see other answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With