mirror of
https://github.com/docker/docs.git
synced 2026-03-30 07:48:52 +07:00
8afe967a80ec7fd68b3fe7a33e9bab60ea4bc4ff
The main goal of this patch was to make the VirtualBox driver wait for SSH before trying to get the IP of the VM. The generic WaitForSSH method required a Host struct as an arg. This patch moves most of the logic to the driver package so that drivers can call WaitForSSH. The existing functions in host are just wrappers to the real implementation in drivers now. Signed-off-by: Darren Shepherd <darren@rancher.com>
Docker Machine
Machine lets you create Docker hosts on your computer, on cloud providers, and inside your own data center. It creates servers, installs Docker on them, then configures the Docker client to talk to them.
It works a bit like this:
$ docker-machine create -d virtualbox dev
INFO[0000] Creating SSH key...
INFO[0000] Creating VirtualBox VM...
INFO[0007] Starting VirtualBox VM...
INFO[0007] Waiting for VM to start...
INFO[0041] "dev" has been created and is now the active machine.
INFO[0041] To point your Docker client at it, run this in your shell: eval "$(docker-machine env dev)"
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running tcp://192.168.99.127:2376
$ eval "$(docker-machine env dev)"
$ docker run busybox echo hello world
Unable to find image 'busybox:latest' locally
511136ea3c5a: Pull complete
df7546f9f060: Pull complete
ea13149945cb: Pull complete
4986bf8c1536: Pull complete
hello world
$ docker-machine create -d digitalocean --digitalocean-access-token=secret staging
INFO[0000] Creating SSH key...
INFO[0001] Creating Digital Ocean droplet...
INFO[0002] Waiting for SSH...
INFO[0070] Configuring Machine...
INFO[0109] "staging" has been created and is now the active machine.
INFO[0109] To point your Docker client at it, run this in your shell: eval "$(docker-machine env staging)"
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
dev virtualbox Running tcp://192.168.99.127:2376
staging * digitalocean Running tcp://104.236.253.181:2376
Installation and documentation
Full documentation is available here.
Contributing
Want to hack on Machine? Please start with the Contributing Guide.
Description
Languages
Markdown
97.3%
HTML
1.7%
CSS
0.4%
JavaScript
0.2%
Go
0.1%