2014-12-04 15:05:11 +01:00
# Docker Machine
2015-04-06 12:57:00 -07:00
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.
2014-12-04 15:05:11 +01:00
It works a bit like this:
2014-12-30 10:52:15 -08:00
```console
2015-01-22 18:05:52 +00:00
$ docker-machine create -d virtualbox dev
2015-06-16 15:47:32 -07:00
Creating CA: /home/username/.docker/machine/certs/ca.pem
Creating client certificate: /home/username/.docker/machine/certs/cert.pem
Image cache does not exist, creating it at /home/username/.docker/machine/cache...
No default boot2docker iso found locally, downloading the latest release...
Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.6.2/boot2docker.iso to /home/username/.docker/machine/cache/boot2docker.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
To see how to connect Docker to this machine, run: docker-machine env dev
2014-12-30 10:52:15 -08:00
2015-01-22 18:05:52 +00:00
$ docker-machine ls
2015-02-26 00:18:18 -08:00
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running tcp://192.168.99.127:2376
2015-03-16 18:33:24 -06:00
$ eval "$(docker-machine env dev)"
2015-02-26 00:18:18 -08:00
$ 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
2014-12-30 10:52:15 -08:00
hello world
2015-02-26 00:18:18 -08:00
$ docker-machine create -d digitalocean --digitalocean-access-token=secret staging
2015-06-16 15:47:32 -07:00
Creating SSH key...
Creating Digital Ocean droplet...
To see how to connect Docker to this machine, run: docker-machine env staging
2014-12-30 10:52:15 -08:00
2015-01-22 18:05:52 +00:00
$ docker-machine ls
2015-02-26 00:18:18 -08:00
NAME ACTIVE DRIVER STATE URL SWARM
dev virtualbox Running tcp://192.168.99.127:2376
staging * digitalocean Running tcp://104.236.253.181:2376
2014-12-30 10:52:15 -08:00
```
2014-12-04 15:05:11 +01:00
2015-02-20 14:50:49 +00:00
## Installation and documentation
2014-12-04 15:05:11 +01:00
2015-02-20 14:50:49 +00:00
Full documentation [is available here ](https://docs.docker.com/machine/ ).
2015-02-05 07:22:09 -05:00
2014-12-04 15:05:11 +01:00
## Contributing
2015-04-13 09:22:35 -04:00
Want to hack on Machine? Please start with the [Contributing Guide ](https://github.com/docker/machine/blob/master/CONTRIBUTING.md ).
2014-12-08 13:12:35 -08:00