Update docs usage and output

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
Nathan LeClaire 2015-06-16 15:47:32 -07:00
parent 77fd2104f7
commit 8fab2e5950
2 changed files with 57 additions and 52 deletions

View File

@ -8,12 +8,16 @@ It works a bit like this:
```console ```console
$ docker-machine create -d virtualbox dev $ docker-machine create -d virtualbox dev
INFO[0000] Creating SSH key... Creating CA: /home/username/.docker/machine/certs/ca.pem
INFO[0000] Creating VirtualBox VM... Creating client certificate: /home/username/.docker/machine/certs/cert.pem
INFO[0007] Starting VirtualBox VM... Image cache does not exist, creating it at /home/username/.docker/machine/cache...
INFO[0007] Waiting for VM to start... No default boot2docker iso found locally, downloading the latest release...
INFO[0041] "dev" has been created and is now the active machine. Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.6.2/boot2docker.iso to /home/username/.docker/machine/cache/boot2docker.iso...
INFO[0041] To point your Docker client at it, run this in your shell: eval "$(docker-machine env dev)" 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
$ docker-machine ls $ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM NAME ACTIVE DRIVER STATE URL SWARM
@ -30,12 +34,9 @@ ea13149945cb: Pull complete
hello world hello world
$ docker-machine create -d digitalocean --digitalocean-access-token=secret staging $ docker-machine create -d digitalocean --digitalocean-access-token=secret staging
INFO[0000] Creating SSH key... Creating SSH key...
INFO[0001] Creating Digital Ocean droplet... Creating Digital Ocean droplet...
INFO[0002] Waiting for SSH... To see how to connect Docker to this machine, run: docker-machine env staging
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 $ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM NAME ACTIVE DRIVER STATE URL SWARM

View File

@ -140,16 +140,20 @@ daemon installed, and will create and start a VirtualBox VM with Docker running.
``` ```
$ docker-machine create --driver virtualbox dev $ docker-machine create --driver virtualbox dev
INFO[0001] Downloading boot2docker.iso to /home/<your username>/.docker/machine/cache/boot2docker.iso... Creating CA: /home/username/.docker/machine/certs/ca.pem
INFO[0011] Creating SSH key... Creating client certificate: /home/username/.docker/machine/certs/cert.pem
INFO[0012] Creating VirtualBox VM... Image cache does not exist, creating it at /home/username/.docker/machine/cache...
INFO[0019] Starting VirtualBox VM... No default boot2docker iso found locally, downloading the latest release...
INFO[0020] Waiting for VM to start... Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.6.2/boot2docker.iso to /home/username/.docker/machine/cache/boot2docker.iso...
INFO[0053] To see how to connect Docker to this machine, run: docker-machine env dev" 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
``` ```
You can see the machine you have created by running the `docker-machine ls` command You can see the machine you have created by running the `docker-machine ls`
again: command again:
``` ```
$ docker-machine ls $ docker-machine ls
@ -157,9 +161,9 @@ NAME ACTIVE DRIVER STATE URL SWARM
dev virtualbox Running tcp://192.168.99.100:2376 dev virtualbox Running tcp://192.168.99.100:2376
``` ```
Next, as noted in the output of the `docker-machine create` command, we have to tell Next, as noted in the output of the `docker-machine create` command, we have to
Docker to talk to that machine. You can do this with the `docker-machine env` tell Docker to talk to that machine. You can do this with the `docker-machine
command. For example, env` command. For example,
``` ```
$ eval "$(docker-machine env dev)" $ eval "$(docker-machine env dev)"
@ -204,7 +208,7 @@ Any exposed ports are available on the Docker hosts IP address, which you can
get using the `docker-machine ip` command: get using the `docker-machine ip` command:
``` ```
$ docker-machine ip $ docker-machine ip dev
192.168.99.100 192.168.99.100
``` ```
@ -297,11 +301,9 @@ $ docker-machine create \
--driver digitalocean \ --driver digitalocean \
--digitalocean-access-token 0ab77166d407f479c6701652cee3a46830fef88b8199722b87821621736ab2d4 \ --digitalocean-access-token 0ab77166d407f479c6701652cee3a46830fef88b8199722b87821621736ab2d4 \
staging staging
INFO[0000] Creating SSH key... Creating SSH key...
INFO[0000] Creating Digital Ocean droplet... Creating Digital Ocean droplet...
INFO[0002] Waiting for SSH... To see how to connect Docker to this machine, run: docker-machine env staging
INFO[0085] "staging" has been created.
INFO[0085] To see how to connect Docker to this machine, run: docker-machine env staging"
``` ```
For convenience, `docker-machine` will use sensible defaults for choosing For convenience, `docker-machine` will use sensible defaults for choosing
@ -465,12 +467,16 @@ Create a machine.
``` ```
$ docker-machine create --driver virtualbox dev $ docker-machine create --driver virtualbox dev
INFO[0001] Downloading boot2docker.iso to /home/ehazlett/.docker/machine/cache/boot2docker.iso... Creating CA: /home/username/.docker/machine/certs/ca.pem
INFO[0000] Creating SSH key... Creating client certificate: /home/username/.docker/machine/certs/cert.pem
INFO[0000] Creating VirtualBox VM... Image cache does not exist, creating it at /home/username/.docker/machine/cache...
INFO[0007] Starting VirtualBox VM... No default boot2docker iso found locally, downloading the latest release...
INFO[0007] Waiting for VM to start... Downloading https://github.com/boot2docker/boot2docker/releases/download/v1.6.2/boot2docker.iso to /home/username/.docker/machine/cache/boot2docker.iso...
INFO[0038] To see how to connect Docker to this machine, run: docker-machine env dev 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
``` ```
##### Filtering create flags by driver in the help text ##### Filtering create flags by driver in the help text
@ -803,8 +809,6 @@ Show help text.
Get the IP address of one or more machines. Get the IP address of one or more machines.
``` ```
$ docker-machine ip
192.168.99.104
$ docker-machine ip dev $ docker-machine ip dev
192.168.99.104 192.168.99.104
$ docker-machine ip dev dev2 $ docker-machine ip dev dev2
@ -872,9 +876,9 @@ dev virtualbox Stopped
Regenerate TLS certificates and update the machine with new certs. Regenerate TLS certificates and update the machine with new certs.
``` ```
$ docker-machine regenerate-certs $ docker-machine regenerate-certs dev
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
INFO[0013] Regenerating TLS certificates Regenerating TLS certificates
``` ```
#### restart #### restart
@ -883,8 +887,8 @@ Restart a machine. Oftentimes this is equivalent to
`docker-machine stop; machine start`. `docker-machine stop; machine start`.
``` ```
$ docker-machine restart $ docker-machine restart dev
INFO[0005] Waiting for VM to start... Waiting for VM to start...
``` ```
#### rm #### rm
@ -1010,11 +1014,11 @@ local host's filesystem first (using `scp`'s `-3` flag).
#### start #### start
Gracefully start a machine. Start a machine.
``` ```
$ docker-machine restart $ docker-machine start dev
INFO[0005] Waiting for VM to start... Starting VM...
``` ```
#### stop #### stop
@ -1041,11 +1045,11 @@ with the latest.
``` ```
$ docker-machine upgrade dev $ docker-machine upgrade dev
INFO[0000] Stopping machine to do the upgrade... Stopping machine to do the upgrade...
INFO[0005] Upgrading machine dev... Upgrading machine dev...
INFO[0006] Downloading latest boot2docker release to /tmp/store/cache/boot2docker.iso... Downloading latest boot2docker release to /home/username/.docker/machine/cache/boot2docker.iso...
INFO[0008] Starting machine back up... Starting machine back up...
INFO[0008] Waiting for VM to start... Waiting for VM to start...
``` ```
> **Note**: If you are using a custom boot2docker ISO specified using > **Note**: If you are using a custom boot2docker ISO specified using
@ -1058,7 +1062,7 @@ INFO[0008] Waiting for VM to start...
Get the URL of a host Get the URL of a host
``` ```
$ docker-machine url $ docker-machine url dev
tcp://192.168.99.109:2376 tcp://192.168.99.109:2376
``` ```
@ -1637,9 +1641,9 @@ To use a different base operating system on a remote provider, specify the
provider's image flag and one of its available images. For example, to provider's image flag and one of its available images. For example, to
select a `debian-8-x64` image on DigitalOcean you would supply the following: select a `debian-8-x64` image on DigitalOcean you would supply the following:
--digitalocean-image=debian-8-x64` --digitalocean-image=debian-8-x64
If you change the base image for a provider, you may also need to change If you change the base image for a provider, you may also need to change
the SSH user. For example, the default Red Hat AMI on EC2 expects the the SSH user. For example, the default Red Hat AMI on EC2 expects the
SSH user to be `ec2-user`, so you would have to specify this with SSH user to be `ec2-user`, so you would have to specify this with
`--amazonec2-ssh-user ec2-user`. `--amazonec2-ssh-user ec2-user`.