From 5ea225187a3a843d4237efe377262fb686f659d3 Mon Sep 17 00:00:00 2001 From: Joao Fernandes Date: Tue, 25 Oct 2016 13:58:10 -0700 Subject: [PATCH] Update code blocks in machine/reference --- machine/reference/active.md | 21 ++- machine/reference/config.md | 31 ++-- machine/reference/create.md | 206 ++++++++++++++------------ machine/reference/env.md | 108 ++++++++------ machine/reference/help.md | 22 +-- machine/reference/inspect.md | 99 +++++++------ machine/reference/ip.md | 13 +- machine/reference/kill.md | 26 ++-- machine/reference/ls.md | 82 +++++----- machine/reference/provision.md | 11 +- machine/reference/regenerate-certs.md | 25 ++-- machine/reference/restart.md | 18 ++- machine/reference/rm.md | 72 ++++----- machine/reference/scp.md | 20 +-- machine/reference/ssh.md | 81 +++++----- machine/reference/start.md | 17 ++- machine/reference/status.md | 16 +- machine/reference/stop.md | 29 ++-- machine/reference/upgrade.md | 15 +- machine/reference/url.md | 6 +- 20 files changed, 513 insertions(+), 405 deletions(-) diff --git a/machine/reference/active.md b/machine/reference/active.md index caa7850d9a..96a2ef84d7 100644 --- a/machine/reference/active.md +++ b/machine/reference/active.md @@ -13,11 +13,16 @@ title: active See which machine is "active" (a machine is considered active if the `DOCKER_HOST` environment variable points to it). - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL - dev - virtualbox Running tcp://192.168.99.103:2376 - staging * digitalocean Running tcp://203.0.113.81:2376 - $ echo $DOCKER_HOST - tcp://203.0.113.81:2376 - $ docker-machine active - staging +```none +$ docker-machine ls + +NAME ACTIVE DRIVER STATE URL +dev - virtualbox Running tcp://192.168.99.103:2376 +staging * digitalocean Running tcp://203.0.113.81:2376 + +$ echo $DOCKER_HOST +tcp://203.0.113.81:2376 + +$ docker-machine active +staging +``` diff --git a/machine/reference/config.md b/machine/reference/config.md index 8f9a89a96b..640dc3c1c3 100644 --- a/machine/reference/config.md +++ b/machine/reference/config.md @@ -10,23 +10,26 @@ title: config # config - Usage: docker-machine config [OPTIONS] [arg...] +```none +Usage: docker-machine config [OPTIONS] [arg...] - Print the connection config for machine +Print the connection config for machine - Description: - Argument is a machine name. +Description: + Argument is a machine name. - Options: +Options: - --swarm Display the Swarm config instead of the Docker daemon + --swarm Display the Swarm config instead of the Docker daemon +``` +For example: -For example: - - $ docker-machine config dev - --tlsverify - --tlscacert="/Users/ehazlett/.docker/machines/dev/ca.pem" - --tlscert="/Users/ehazlett/.docker/machines/dev/cert.pem" - --tlskey="/Users/ehazlett/.docker/machines/dev/key.pem" - -H tcp://192.168.99.103:2376 +```none +$ docker-machine config dev \ +--tlsverify \ +--tlscacert="/Users/ehazlett/.docker/machines/dev/ca.pem" \ +--tlscert="/Users/ehazlett/.docker/machines/dev/cert.pem" \ +--tlskey="/Users/ehazlett/.docker/machines/dev/key.pem" \ +-H tcp://192.168.99.103:2376 +``` diff --git a/machine/reference/create.md b/machine/reference/create.md index 1f440058ab..6191603c67 100644 --- a/machine/reference/create.md +++ b/machine/reference/create.md @@ -15,17 +15,19 @@ Create a machine. Requires the `--driver` flag to indicate which provider (VirtualBox, DigitalOcean, AWS, etc.) the machine should be created on, and an argument to indicate the name of the created machine. - $ docker-machine create --driver virtualbox dev - 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 +```none +$ docker-machine create --driver virtualbox dev +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 +``` ## Accessing driver-specific flags in the help text @@ -34,33 +36,35 @@ drivers. These largely control aspects of Machine's provisoning process (including the creation of Docker Swarm containers) that the user may wish to customize. - $ docker-machine create - Docker Machine Version: 0.5.0 (45e3688) - Usage: docker-machine create [OPTIONS] [arg...] +```none +$ docker-machine create +Docker Machine Version: 0.5.0 (45e3688) +Usage: docker-machine create [OPTIONS] [arg...] - Create a machine. +Create a machine. - Run 'docker-machine create --driver name' to include the create flags for that driver in the help text. +Run 'docker-machine create --driver name' to include the create flags for that driver in the help text. - Options: +Options: - --driver, -d "none" Driver to create machine with. - --engine-install-url "https://get.docker.com" Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL] - --engine-opt [--engine-opt option --engine-opt option] Specify arbitrary flags to include with the created engine in the form flag=value - --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option] Specify insecure registries to allow with the created engine - --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option] Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR] - --engine-label [--engine-label option --engine-label option] Specify labels for the created engine - --engine-storage-driver Specify a storage driver to use with the engine - --engine-env [--engine-env option --engine-env option] Specify environment variables to set in the engine - --swarm Configure Machine with Swarm - --swarm-image "swarm:latest" Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE] - --swarm-master Configure Machine to be a Swarm master - --swarm-discovery Discovery service to use with Swarm - --swarm-strategy "spread" Define a default scheduling strategy for Swarm - --swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm - --swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master - --swarm-addr addr to advertise for Swarm (default: detect and use the machine IP) - --swarm-experimental Enable Swarm experimental features + --driver, -d "none" Driver to create machine with. + --engine-install-url "https://get.docker.com" Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL] + --engine-opt [--engine-opt option --engine-opt option] Specify arbitrary flags to include with the created engine in the form flag=value + --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option] Specify insecure registries to allow with the created engine + --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option] Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR] + --engine-label [--engine-label option --engine-label option] Specify labels for the created engine + --engine-storage-driver Specify a storage driver to use with the engine + --engine-env [--engine-env option --engine-env option] Specify environment variables to set in the engine + --swarm Configure Machine with Swarm + --swarm-image "swarm:latest" Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE] + --swarm-master Configure Machine to be a Swarm master + --swarm-discovery Discovery service to use with Swarm + --swarm-strategy "spread" Define a default scheduling strategy for Swarm + --swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm + --swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master + --swarm-addr addr to advertise for Swarm (default: detect and use the machine IP) + --swarm-experimental Enable Swarm experimental features +``` Additionally, drivers can specify flags that Machine can accept as part of their plugin code. These allow users to customize the provider-specific parameters of @@ -70,43 +74,45 @@ geographical region (`--amazonec2-region us-west-1`), and so on. To see the provider-specific flags, simply pass a value for `--driver` when invoking the `create` help text. - $ docker-machine create --driver virtualbox --help - Usage: docker-machine create [OPTIONS] [arg...] +```none +$ docker-machine create --driver virtualbox --help +Usage: docker-machine create [OPTIONS] [arg...] - Create a machine. +Create a machine. - Run 'docker-machine create --driver name' to include the create flags for that driver in the help text. +Run 'docker-machine create --driver name' to include the create flags for that driver in the help text. - Options: +Options: - --driver, -d "none" Driver to create machine with. - --engine-env [--engine-env option --engine-env option] Specify environment variables to set in the engine - --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option] Specify insecure registries to allow with the created engine - --engine-install-url "https://get.docker.com" Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL] - --engine-label [--engine-label option --engine-label option] Specify labels for the created engine - --engine-opt [--engine-opt option --engine-opt option] Specify arbitrary flags to include with the created engine in the form flag=value - --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option] Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR] - --engine-storage-driver Specify a storage driver to use with the engine - --swarm Configure Machine with Swarm - --swarm-addr addr to advertise for Swarm (default: detect and use the machine IP) - --swarm-discovery Discovery service to use with Swarm - --swarm-experimental Enable Swarm experimental features - --swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master - --swarm-image "swarm:latest" Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE] - --swarm-master Configure Machine to be a Swarm master - --swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm - --swarm-strategy "spread" Define a default scheduling strategy for Swarm - --virtualbox-boot2docker-url The URL of the boot2docker image. Defaults to the latest available version [$VIRTUALBOX_BOOT2DOCKER_URL] - --virtualbox-cpu-count "1" number of CPUs for the machine (-1 to use the number of CPUs available) [$VIRTUALBOX_CPU_COUNT] - --virtualbox-disk-size "20000" Size of disk for host in MB [$VIRTUALBOX_DISK_SIZE] - --virtualbox-host-dns-resolver Use the host DNS resolver [$VIRTUALBOX_HOST_DNS_RESOLVER] - --virtualbox-dns-proxy Proxy all DNS requests to the host [$VIRTUALBOX_DNS_PROXY] - --virtualbox-hostonly-cidr "192.168.99.1/24" Specify the Host Only CIDR [$VIRTUALBOX_HOSTONLY_CIDR] - --virtualbox-hostonly-nicpromisc "deny" Specify the Host Only Network Adapter Promiscuous Mode [$VIRTUALBOX_HOSTONLY_NIC_PROMISC] - --virtualbox-hostonly-nictype "82540EM" Specify the Host Only Network Adapter Type [$VIRTUALBOX_HOSTONLY_NIC_TYPE] - --virtualbox-import-boot2docker-vm The name of a Boot2Docker VM to import - --virtualbox-memory "1024" Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE] - --virtualbox-no-share Disable the mount of your home directory + --driver, -d "none" Driver to create machine with. + --engine-env [--engine-env option --engine-env option] Specify environment variables to set in the engine + --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option] Specify insecure registries to allow with the created engine + --engine-install-url "https://get.docker.com" Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL] + --engine-label [--engine-label option --engine-label option] Specify labels for the created engine + --engine-opt [--engine-opt option --engine-opt option] Specify arbitrary flags to include with the created engine in the form flag=value + --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option] Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR] + --engine-storage-driver Specify a storage driver to use with the engine + --swarm Configure Machine with Swarm + --swarm-addr addr to advertise for Swarm (default: detect and use the machine IP) + --swarm-discovery Discovery service to use with Swarm + --swarm-experimental Enable Swarm experimental features + --swarm-host "tcp://0.0.0.0:3376" ip/socket to listen on for Swarm master + --swarm-image "swarm:latest" Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE] + --swarm-master Configure Machine to be a Swarm master + --swarm-opt [--swarm-opt option --swarm-opt option] Define arbitrary flags for swarm + --swarm-strategy "spread" Define a default scheduling strategy for Swarm + --virtualbox-boot2docker-url The URL of the boot2docker image. Defaults to the latest available version [$VIRTUALBOX_BOOT2DOCKER_URL] + --virtualbox-cpu-count "1" number of CPUs for the machine (-1 to use the number of CPUs available) [$VIRTUALBOX_CPU_COUNT] + --virtualbox-disk-size "20000" Size of disk for host in MB [$VIRTUALBOX_DISK_SIZE] + --virtualbox-host-dns-resolver Use the host DNS resolver [$VIRTUALBOX_HOST_DNS_RESOLVER] + --virtualbox-dns-proxy Proxy all DNS requests to the host [$VIRTUALBOX_DNS_PROXY] + --virtualbox-hostonly-cidr "192.168.99.1/24" Specify the Host Only CIDR [$VIRTUALBOX_HOSTONLY_CIDR] + --virtualbox-hostonly-nicpromisc "deny" Specify the Host Only Network Adapter Promiscuous Mode [$VIRTUALBOX_HOSTONLY_NIC_PROMISC] + --virtualbox-hostonly-nictype "82540EM" Specify the Host Only Network Adapter Type [$VIRTUALBOX_HOSTONLY_NIC_TYPE] + --virtualbox-import-boot2docker-vm The name of a Boot2Docker VM to import + --virtualbox-memory "1024" Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE] + --virtualbox-no-share Disable the mount of your home directory +``` You may notice that some flags specify environment variables that they are associated with as well (located to the far left hand side of the row). If @@ -137,12 +143,14 @@ filesystem has been created, and so on. The following is an example usage: - $ docker-machine create -d virtualbox \ - --engine-label foo=bar \ - --engine-label spam=eggs \ - --engine-storage-driver overlay \ - --engine-insecure-registry registry.myco.com \ - foobarmachine +```none +$ docker-machine create -d virtualbox \ + --engine-label foo=bar \ + --engine-label spam=eggs \ + --engine-storage-driver overlay \ + --engine-insecure-registry registry.myco.com \ + foobarmachine +``` This will create a virtual machine running locally in Virtualbox which uses the `overlay` storage backend, has the key-value pairs `foo=bar` and `spam=eggs` as @@ -150,18 +158,20 @@ labels on the engine, and allows pushing / pulling from the insecure registry located at `registry.myco.com`. You can verify much of this by inspecting the output of `docker info`: - $ eval $(docker-machine env foobarmachine) - $ docker info - Containers: 0 - Images: 0 - Storage Driver: overlay - ... - Name: foobarmachine - ... - Labels: - foo=bar - spam=eggs - provider=virtualbox +```none +$ eval $(docker-machine env foobarmachine) +$ docker info +Containers: 0 +Images: 0 +Storage Driver: overlay +... +Name: foobarmachine +... +Labels: + foo=bar + spam=eggs + provider=virtualbox +``` The supported flags are as follows: @@ -181,10 +191,12 @@ for all containers, and always use the `syslog` [log driver](/engine/reference/run.md#logging-drivers-log-driver) you could run the following create command: - $ docker-machine create -d virtualbox \ - --engine-opt dns=8.8.8.8 \ - --engine-opt log-driver=syslog \ - gdns +```none +$ docker-machine create -d virtualbox \ + --engine-opt dns=8.8.8.8 \ + --engine-opt log-driver=syslog \ + gdns +``` Additionally, Docker Machine supports a flag, `--engine-env`, which can be used to specify arbitrary environment variables to be set within the engine with the syntax `--engine-env name=value`. For example, to specify that the engine should use `example.com` as the proxy server, you could run the following create command: @@ -217,13 +229,15 @@ you won't have to worry about it. Example create: - $ docker-machine create -d virtualbox \ - --swarm \ - --swarm-master \ - --swarm-discovery token:// \ - --swarm-strategy binpack \ - --swarm-opt heartbeat=5 \ - upbeat +```none +$ docker-machine create -d virtualbox \ + --swarm \ + --swarm-master \ + --swarm-discovery token:// \ + --swarm-strategy binpack \ + --swarm-opt heartbeat=5 \ + upbeat +``` This will set the swarm scheduling strategy to "binpack" (pack in containers as tightly as possible per host instead of spreading them out), and the "heartbeat" diff --git a/machine/reference/env.md b/machine/reference/env.md index 2f8b1ae07c..fa0e8d0b40 100644 --- a/machine/reference/env.md +++ b/machine/reference/env.md @@ -13,37 +13,41 @@ title: env Set environment variables to dictate that `docker` should run a command against a particular machine. - $ docker-machine env --help +```none +$ docker-machine env --help - Usage: docker-machine env [OPTIONS] [arg...] +Usage: docker-machine env [OPTIONS] [arg...] - Display the commands to set up the environment for the Docker client +Display the commands to set up the environment for the Docker client - Description: - Argument is a machine name. +Description: + Argument is a machine name. - Options: +Options: - --swarm Display the Swarm config instead of the Docker daemon - --shell Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh], default is sh/bash - --unset, -u Unset variables instead of setting them - --no-proxy Add machine IP to NO_PROXY environment variable + --swarm Display the Swarm config instead of the Docker daemon + --shell Force environment to be configured for a specified shell: [fish, cmd, powershell, tcsh], default is sh/bash + --unset, -u Unset variables instead of setting them + --no-proxy Add machine IP to NO_PROXY environment variable +``` `docker-machine env machinename` will print out `export` commands which can be run in a subshell. Running `docker-machine env -u` will print `unset` commands which reverse this effect. - $ env | grep DOCKER - $ eval "$(docker-machine env dev)" - $ env | grep DOCKER - DOCKER_HOST=tcp://192.168.99.101:2376 - DOCKER_CERT_PATH=/Users/nathanleclaire/.docker/machines/.client - DOCKER_TLS_VERIFY=1 - DOCKER_MACHINE_NAME=dev - $ # If you run a docker command, now it will run against that host. - $ eval "$(docker-machine env -u)" - $ env | grep DOCKER - $ # The environment variables have been unset. +```none +$ env | grep DOCKER +$ eval "$(docker-machine env dev)" +$ env | grep DOCKER +DOCKER_HOST=tcp://192.168.99.101:2376 +DOCKER_CERT_PATH=/Users/nathanleclaire/.docker/machines/.client +DOCKER_TLS_VERIFY=1 +DOCKER_MACHINE_NAME=dev +$ # If you run a docker command, now it will run against that host. +$ eval "$(docker-machine env -u)" +$ env | grep DOCKER +$ # The environment variables have been unset. +``` The output described above is intended for the shells `bash` and `zsh` (if you're not sure which shell you're using, there's a very good possibility that @@ -55,12 +59,14 @@ If you are using `fish` and the `SHELL` environment variable is correctly set to the path where `fish` is located, `docker-machine env name` will print out the values in the format which `fish` expects: - set -x DOCKER_TLS_VERIFY 1; - set -x DOCKER_CERT_PATH "/Users/nathanleclaire/.docker/machine/machines/overlay"; - set -x DOCKER_HOST tcp://192.168.99.102:2376; - set -x DOCKER_MACHINE_NAME overlay - # Run this command to configure your shell: - # eval "$(docker-machine env overlay)" +```none +set -x DOCKER_TLS_VERIFY 1; +set -x DOCKER_CERT_PATH "/Users/nathanleclaire/.docker/machine/machines/overlay"; +set -x DOCKER_HOST tcp://192.168.99.102:2376; +set -x DOCKER_MACHINE_NAME overlay +# Run this command to configure your shell: +# eval "$(docker-machine env overlay)" +``` If you are on Windows and using either Powershell or `cmd.exe`, `docker-machine env` Docker Machine should now detect your shell automatically. If the automagic detection does not work you @@ -68,22 +74,26 @@ If you are on Windows and using either Powershell or `cmd.exe`, `docker-machine For Powershell: - $ docker-machine.exe env --shell powershell dev - $Env:DOCKER_TLS_VERIFY = "1" - $Env:DOCKER_HOST = "tcp://192.168.99.101:2376" - $Env:DOCKER_CERT_PATH = "C:\Users\captain\.docker\machine\machines\dev" - $Env:DOCKER_MACHINE_NAME = "dev" - # Run this command to configure your shell: - # docker-machine.exe env --shell=powershell dev | Invoke-Expression +```none +$ docker-machine.exe env --shell powershell dev +$Env:DOCKER_TLS_VERIFY = "1" +$Env:DOCKER_HOST = "tcp://192.168.99.101:2376" +$Env:DOCKER_CERT_PATH = "C:\Users\captain\.docker\machine\machines\dev" +$Env:DOCKER_MACHINE_NAME = "dev" +# Run this command to configure your shell: +# docker-machine.exe env --shell=powershell dev | Invoke-Expression +``` For `cmd.exe`: - $ docker-machine.exe env --shell cmd dev - set DOCKER_TLS_VERIFY=1 - set DOCKER_HOST=tcp://192.168.99.101:2376 - set DOCKER_CERT_PATH=C:\Users\captain\.docker\machine\machines\dev - set DOCKER_MACHINE_NAME=dev - # Run this command to configure your shell: copy and paste the above values into your command prompt +```none +$ docker-machine.exe env --shell cmd dev +set DOCKER_TLS_VERIFY=1 +set DOCKER_HOST=tcp://192.168.99.101:2376 +set DOCKER_CERT_PATH=C:\Users\captain\.docker\machine\machines\dev +set DOCKER_MACHINE_NAME=dev +# Run this command to configure your shell: copy and paste the above values into your command prompt +``` ## Excluding the created machine from proxies @@ -95,14 +105,16 @@ This is useful when using `docker-machine` with a local VM provider (e.g. `virtualbox` or `vmwarefusion`) in network environments where a HTTP proxy is required for internet access. - $ docker-machine env --no-proxy default - export DOCKER_TLS_VERIFY="1" - export DOCKER_HOST="tcp://192.168.99.104:2376" - export DOCKER_CERT_PATH="/Users/databus23/.docker/machine/certs" - export DOCKER_MACHINE_NAME="default" - export NO_PROXY="192.168.99.104" - # Run this command to configure your shell: - # eval "$(docker-machine env default)" +```none +$ docker-machine env --no-proxy default +export DOCKER_TLS_VERIFY="1" +export DOCKER_HOST="tcp://192.168.99.104:2376" +export DOCKER_CERT_PATH="/Users/databus23/.docker/machine/certs" +export DOCKER_MACHINE_NAME="default" +export NO_PROXY="192.168.99.104" +# Run this command to configure your shell: +# eval "$(docker-machine env default)" +``` You may also want to visit the [documentation on setting `HTTP_PROXY` for the created daemon using the `--engine-env` flag for `docker-machine diff --git a/machine/reference/help.md b/machine/reference/help.md index 748938f77b..c43a7e2560 100644 --- a/machine/reference/help.md +++ b/machine/reference/help.md @@ -10,22 +10,26 @@ title: help # help - Usage: docker-machine help [arg...] +```none +Usage: docker-machine help [arg...] - Shows a list of commands or help for one command +Shows a list of commands or help for one command +``` Usage: docker-machine help _subcommand_ For example: - $ docker-machine help config - Usage: docker-machine config [OPTIONS] [arg...] +```none +$ docker-machine help config +Usage: docker-machine config [OPTIONS] [arg...] - Print the connection config for machine +Print the connection config for machine - Description: - Argument is a machine name. +Description: + Argument is a machine name. - Options: +Options: - --swarm Display the Swarm config instead of the Docker daemon + --swarm Display the Swarm config instead of the Docker daemon +``` diff --git a/machine/reference/inspect.md b/machine/reference/inspect.md index 1358f0e20c..cda92193bf 100644 --- a/machine/reference/inspect.md +++ b/machine/reference/inspect.md @@ -11,15 +11,17 @@ title: inspect # inspect - Usage: docker-machine inspect [OPTIONS] [arg...] +```none +Usage: docker-machine inspect [OPTIONS] [arg...] - Inspect information about a machine +Inspect information about a machine - Description: - Argument is a machine name. +Description: + Argument is a machine name. - Options: - --format, -f Format the output using the given go template. +Options: + --format, -f Format the output using the given go template. +``` By default, this will render information about a machine as JSON. If a format is specified, the given template will be executed for each result. @@ -36,60 +38,63 @@ In addition to the `text/template` syntax, there are some additional functions, This is the default usage of `inspect`. - $ docker-machine inspect dev - { - "DriverName": "virtualbox", - "Driver": { - "MachineName": "docker-host-128be8d287b2028316c0ad5714b90bcfc11f998056f2f790f7c1f43f3d1e6eda", - "SSHPort": 55834, - "Memory": 1024, - "DiskSize": 20000, - "Boot2DockerURL": "", - "IPAddress": "192.168.5.99" - }, - ... - } +```none +$ docker-machine inspect dev + +{ + "DriverName": "virtualbox", + "Driver": { + "MachineName": "docker-host-128be8d287b2028316c0ad5714b90bcfc11f998056f2f790f7c1f43f3d1e6eda", + "SSHPort": 55834, + "Memory": 1024, + "DiskSize": 20000, + "Boot2DockerURL": "", + "IPAddress": "192.168.5.99" + }, + ... +} +``` **Get a machine's IP address:** For the most part, you can pick out any field from the JSON in a fairly straightforward manner. - {% raw %} - $ docker-machine inspect --format='{{.Driver.IPAddress}}' dev - 192.168.5.99 - {% endraw %} +```none +$ docker-machine inspect --format='{{.Driver.IPAddress}}' dev +192.168.5.99 +``` **Formatting details:** If you want a subset of information formatted as JSON, you can use the `json` function in the template. - {% raw %} - $ docker-machine inspect --format='{{json .Driver}}' dev-fusion - {"Boot2DockerURL":"","CPUS":8,"CPUs":8,"CaCertPath":"/Users/hairyhenderson/.docker/machine/certs/ca.pem","DiskSize":20000,"IPAddress":"172.16.62.129","ISO":"/Users/hairyhenderson/.docker/machine/machines/dev-fusion/boot2docker-1.5.0-GH747.iso","MachineName":"dev-fusion","Memory":1024,"PrivateKeyPath":"/Users/hairyhenderson/.docker/machine/certs/ca-key.pem","SSHPort":22,"SSHUser":"docker","SwarmDiscovery":"","SwarmHost":"tcp://0.0.0.0:3376","SwarmMaster":false} - {% endraw %} +```none +$ docker-machine inspect --format='{{json .Driver}}' dev-fusion +{"Boot2DockerURL":"","CPUS":8,"CPUs":8,"CaCertPath":"/Users/hairyhenderson/.docker/machine/certs/ca.pem","DiskSize":20000,"IPAddress":"172.16.62.129","ISO":"/Users/hairyhenderson/.docker/machine/machines/dev-fusion/boot2docker-1.5.0-GH747.iso","MachineName":"dev-fusion","Memory":1024,"PrivateKeyPath":"/Users/hairyhenderson/.docker/machine/certs/ca-key.pem","SSHPort":22,"SSHUser":"docker","SwarmDiscovery":"","SwarmHost":"tcp://0.0.0.0:3376","SwarmMaster":false} +``` While this is usable, it's not very human-readable. For this reason, there is `prettyjson`: - {% raw %} - $ docker-machine inspect --format='{{prettyjson .Driver}}' dev-fusion - { - "Boot2DockerURL": "", - "CPUS": 8, - "CPUs": 8, - "CaCertPath": "/Users/hairyhenderson/.docker/machine/certs/ca.pem", - "DiskSize": 20000, - "IPAddress": "172.16.62.129", - "ISO": "/Users/hairyhenderson/.docker/machine/machines/dev-fusion/boot2docker-1.5.0-GH747.iso", - "MachineName": "dev-fusion", - "Memory": 1024, - "PrivateKeyPath": "/Users/hairyhenderson/.docker/machine/certs/ca-key.pem", - "SSHPort": 22, - "SSHUser": "docker", - "SwarmDiscovery": "", - "SwarmHost": "tcp://0.0.0.0:3376", - "SwarmMaster": false - } - {% endraw %} +``` +$ docker-machine inspect --format='{{prettyjson .Driver}}' dev-fusion +{ + "Boot2DockerURL": "", + "CPUS": 8, + "CPUs": 8, + "CaCertPath": "/Users/hairyhenderson/.docker/machine/certs/ca.pem", + "DiskSize": 20000, + "IPAddress": "172.16.62.129", + "ISO": "/Users/hairyhenderson/.docker/machine/machines/dev-fusion/boot2docker-1.5.0-GH747.iso", + "MachineName": "dev-fusion", + "Memory": 1024, + "PrivateKeyPath": "/Users/hairyhenderson/.docker/machine/certs/ca-key.pem", + "SSHPort": 22, + "SSHUser": "docker", + "SwarmDiscovery": "", + "SwarmHost": "tcp://0.0.0.0:3376", + "SwarmMaster": false +} +``` diff --git a/machine/reference/ip.md b/machine/reference/ip.md index 4f863815f5..f0cfc6f096 100644 --- a/machine/reference/ip.md +++ b/machine/reference/ip.md @@ -12,8 +12,11 @@ title: ip Get the IP address of one or more machines. - $ docker-machine ip dev - 192.168.99.104 - $ docker-machine ip dev dev2 - 192.168.99.104 - 192.168.99.105 +```none +$ docker-machine ip dev +192.168.99.104 + +$ docker-machine ip dev dev2 +192.168.99.104 +192.168.99.105 +``` diff --git a/machine/reference/kill.md b/machine/reference/kill.md index 8867cb2cb0..d6490b571b 100644 --- a/machine/reference/kill.md +++ b/machine/reference/kill.md @@ -11,19 +11,23 @@ title: kill # kill - Usage: docker-machine kill [arg...] +```none +Usage: docker-machine kill [arg...] - Kill (abruptly force stop) a machine +Kill (abruptly force stop) a machine - Description: - Argument(s) are one or more machine names. +Description: + Argument(s) are one or more machine names. +``` For example: - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL - dev * virtualbox Running tcp://192.168.99.104:2376 - $ docker-machine kill dev - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL - dev * virtualbox Stopped +```none +$ docker-machine ls +NAME ACTIVE DRIVER STATE URL +dev * virtualbox Running tcp://192.168.99.104:2376 +$ docker-machine kill dev +$ docker-machine ls +NAME ACTIVE DRIVER STATE URL +dev * virtualbox Stopped +``` diff --git a/machine/reference/ls.md b/machine/reference/ls.md index c6ac98ff06..d262ab21c4 100644 --- a/machine/reference/ls.md +++ b/machine/reference/ls.md @@ -10,16 +10,18 @@ title: ls # ls - Usage: docker-machine ls [OPTIONS] [arg...] +```none +Usage: docker-machine ls [OPTIONS] [arg...] - List machines +List machines - Options: +Options: - --quiet, -q Enable quiet mode - --filter [--filter option --filter option] Filter output based on conditions provided - --timeout, -t "10" Timeout in seconds, default to 10s - --format, -f Pretty-print machines using a Go template + --quiet, -q Enable quiet mode + --filter [--filter option --filter option] Filter output based on conditions provided + --timeout, -t "10" Timeout in seconds, default to 10s + --format, -f Pretty-print machines using a Go template +``` ## Timeout @@ -31,9 +33,11 @@ the -t flag for this purpose with a numerical value in seconds. ### Example - $ docker-machine ls -t 12 - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - default - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 +```none +$ docker-machine ls -t 12 +NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS +default - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 +``` ## Filtering @@ -50,25 +54,27 @@ The currently supported filters are: ### Examples - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - dev - virtualbox Stopped - foo0 - virtualbox Running tcp://192.168.99.105:2376 v1.9.1 - foo1 - virtualbox Running tcp://192.168.99.106:2376 v1.9.1 - foo2 * virtualbox Running tcp://192.168.99.107:2376 v1.9.1 +```none +$ docker-machine ls +NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS +dev - virtualbox Stopped +foo0 - virtualbox Running tcp://192.168.99.105:2376 v1.9.1 +foo1 - virtualbox Running tcp://192.168.99.106:2376 v1.9.1 +foo2 * virtualbox Running tcp://192.168.99.107:2376 v1.9.1 - $ docker-machine ls --filter name=foo0 - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - foo0 - virtualbox Running tcp://192.168.99.105:2376 v1.9.1 +$ docker-machine ls --filter name=foo0 +NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS +foo0 - virtualbox Running tcp://192.168.99.105:2376 v1.9.1 - $ docker-machine ls --filter driver=virtualbox --filter state=Stopped - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - dev - virtualbox Stopped v1.9.1 +$ docker-machine ls --filter driver=virtualbox --filter state=Stopped +NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS +dev - virtualbox Stopped v1.9.1 - $ docker-machine ls --filter label=com.class.app=foo1 --filter label=com.class.app=foo2 - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - foo1 - virtualbox Running tcp://192.168.99.105:2376 v1.9.1 - foo2 * virtualbox Running tcp://192.168.99.107:2376 v1.9.1 +$ docker-machine ls --filter label=com.class.app=foo1 --filter label=com.class.app=foo2 +NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS +foo1 - virtualbox Running tcp://192.168.99.105:2376 v1.9.1 +foo2 * virtualbox Running tcp://192.168.99.107:2376 v1.9.1 +``` ## Formatting @@ -77,7 +83,7 @@ The formatting option (`--format`) will pretty-print machines using a Go templat Valid placeholders for the Go template are listed below: | Placeholder | Description | -| -------------- | ---------------------------------------- | +|:---------------|:-----------------------------------------| | .Name | Machine name | | .Active | Is the machine active? | | .ActiveHost | Is the machine an active non-swarm host? | @@ -96,17 +102,17 @@ when using the table directive, will include column headers as well. The following example uses a template without headers and outputs the `Name` and `Driver` entries separated by a colon for all running machines: - {% raw %} - $ docker-machine ls --format "{{.Name}}: {{.DriverName}}" - default: virtualbox - ec2: amazonec2 - {% endraw %} +```none +$ docker-machine ls --format "{{.Name}}: {{.DriverName}}" +default: virtualbox +ec2: amazonec2 +``` To list all machine names with their driver in a table format you can use: - {% raw %} - $ docker-machine ls --format "table {{.Name}} {{.DriverName}}" - NAME DRIVER - default virtualbox - ec2 amazonec2 - {% endraw %} +```none +$ docker-machine ls --format "table {{.Name}} {{.DriverName}}" +NAME DRIVER +default virtualbox +ec2 amazonec2 +``` diff --git a/machine/reference/provision.md b/machine/reference/provision.md index c137fab92e..63dec475f9 100644 --- a/machine/reference/provision.md +++ b/machine/reference/provision.md @@ -19,10 +19,13 @@ originally specified Swarm or Engine configuration). Usage is `docker-machine provision [name]`. Multiple names may be specified. - $ docker-machine provision foo bar - Copying certs to the local machine directory... - Copying certs to the remote machine... - Setting Docker configuration on the remote daemon... +```none +$ docker-machine provision foo bar + +Copying certs to the local machine directory... +Copying certs to the remote machine... +Setting Docker configuration on the remote daemon... +``` The Machine provisioning process will: diff --git a/machine/reference/regenerate-certs.md b/machine/reference/regenerate-certs.md index deb4f32cd3..94105636ef 100644 --- a/machine/reference/regenerate-certs.md +++ b/machine/reference/regenerate-certs.md @@ -10,21 +10,26 @@ title: regenerate-certs # regenerate-certs - Usage: docker-machine regenerate-certs [OPTIONS] [arg...] +```none +Usage: docker-machine regenerate-certs [OPTIONS] [arg...] - Regenerate TLS Certificates for a machine +Regenerate TLS Certificates for a machine - Description: - Argument(s) are one or more machine names. +Description: + Argument(s) are one or more machine names. - Options: +Options: - --force, -f Force rebuild and do not prompt + --force, -f Force rebuild and do not prompt +``` Regenerate TLS certificates and update the machine with new certs. -For example: +For example: - $ docker-machine regenerate-certs dev - Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y - Regenerating TLS certificates +```none +$ docker-machine regenerate-certs dev + +Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y +Regenerating TLS certificates +``` diff --git a/machine/reference/restart.md b/machine/reference/restart.md index 5b685245c5..a1276cead4 100644 --- a/machine/reference/restart.md +++ b/machine/reference/restart.md @@ -11,16 +11,20 @@ title: restart # restart - Usage: docker-machine restart [arg...] +```none +Usage: docker-machine restart [arg...] - Restart a machine +Restart a machine + +Description: + Argument(s) are one or more machine names. +``` - Description: - Argument(s) are one or more machine names. - Restart a machine. Oftentimes this is equivalent to `docker-machine stop; docker-machine start`. But some cloud driver try to implement a clever restart which keeps the same ip address. - $ docker-machine restart dev - Waiting for VM to start... +``` +$ docker-machine restart dev +Waiting for VM to start... +``` diff --git a/machine/reference/rm.md b/machine/reference/rm.md index 25226d9174..7a1c5c4492 100644 --- a/machine/reference/rm.md +++ b/machine/reference/rm.md @@ -14,54 +14,58 @@ title: rm Remove a machine. This will remove the local reference as well as delete it on the cloud provider or virtualization management platform. - $ docker-machine rm --help +```none +$ docker-machine rm --help - Usage: docker-machine rm [OPTIONS] [arg...] +Usage: docker-machine rm [OPTIONS] [arg...] - Remove a machine +Remove a machine - Description: - Argument(s) are one or more machine names. +Description: + Argument(s) are one or more machine names. - Options: +Options: - --force, -f Remove local configuration even if machine cannot be removed, also implies an automatic yes (`-y`) - -y Assumes automatic yes to proceed with remove, without prompting further user confirmation + --force, -f Remove local configuration even if machine cannot be removed, also implies an automatic yes (`-y`) + -y Assumes automatic yes to proceed with remove, without prompting further user confirmation +``` ## Examples - $ docker-machine ls - NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS - bar - virtualbox Running tcp://192.168.99.101:2376 v1.9.1 - baz - virtualbox Running tcp://192.168.99.103:2376 v1.9.1 - foo - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 - qix - virtualbox Running tcp://192.168.99.102:2376 v1.9.1 +```none +$ docker-machine ls +NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS +bar - virtualbox Running tcp://192.168.99.101:2376 v1.9.1 +baz - virtualbox Running tcp://192.168.99.103:2376 v1.9.1 +foo - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 +qix - virtualbox Running tcp://192.168.99.102:2376 v1.9.1 - $ docker-machine rm baz - About to remove baz - Are you sure? (y/n): y - Successfully removed baz +$ docker-machine rm baz +About to remove baz +Are you sure? (y/n): y +Successfully removed baz - $ docker-machine ls - NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS - bar - virtualbox Running tcp://192.168.99.101:2376 v1.9.1 - foo - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 - qix - virtualbox Running tcp://192.168.99.102:2376 v1.9.1 +$ docker-machine ls +NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS +bar - virtualbox Running tcp://192.168.99.101:2376 v1.9.1 +foo - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 +qix - virtualbox Running tcp://192.168.99.102:2376 v1.9.1 - $ docker-machine rm bar qix - About to remove bar, qix - Are you sure? (y/n): y - Successfully removed bar - Successfully removed qix +$ docker-machine rm bar qix +About to remove bar, qix +Are you sure? (y/n): y +Successfully removed bar +Successfully removed qix - $ docker-machine ls - NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS - foo - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 +$ docker-machine ls +NAME ACTIVE URL STATE URL SWARM DOCKER ERRORS +foo - virtualbox Running tcp://192.168.99.100:2376 v1.9.1 - $ docker-machine rm -y foo - About to remove foo - Successfully removed foo +$ docker-machine rm -y foo +About to remove foo +Successfully removed foo +``` diff --git a/machine/reference/scp.md b/machine/reference/scp.md index eee9f89593..635892841a 100644 --- a/machine/reference/scp.md +++ b/machine/reference/scp.md @@ -18,15 +18,17 @@ machine's case, you don't have to specify the name, just the path. Consider the following example: - $ cat foo.txt - cat: foo.txt: No such file or directory - $ docker-machine ssh dev pwd - /home/docker - $ docker-machine ssh dev 'echo A file created remotely! >foo.txt' - $ docker-machine scp dev:/home/docker/foo.txt . - foo.txt 100% 28 0.0KB/s 00:00 - $ cat foo.txt - A file created remotely! +```none +$ cat foo.txt +cat: foo.txt: No such file or directory +$ docker-machine ssh dev pwd +/home/docker +$ docker-machine ssh dev 'echo A file created remotely! >foo.txt' +$ docker-machine scp dev:/home/docker/foo.txt . +foo.txt 100% 28 0.0KB/s 00:00 +$ cat foo.txt +A file created remotely! +``` Just like how `scp` has a `-r` flag for copying files recursively, `docker-machine` has a `-r` flag for this feature. diff --git a/machine/reference/ssh.md b/machine/reference/ssh.md index fb160fc58e..10c24569c6 100644 --- a/machine/reference/ssh.md +++ b/machine/reference/ssh.md @@ -14,45 +14,54 @@ Log into or run a command on a machine using SSH. To login, just run `docker-machine ssh machinename`: - $ docker-machine ssh dev - ## . - ## ## ## == - ## ## ## ## === - /""""""""""""""""\___/ === - ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ - \______ o __/ - \ \ __/ - \____\______/ - _ _ ____ _ _ - | |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ - | '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__| - | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | - |_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_| - Boot2Docker version 1.4.0, build master : 69cf398 - Fri Dec 12 01:39:42 UTC 2014 - docker@boot2docker:~$ ls / - Users/ dev/ home/ lib/ mnt/ proc/ run/ sys/ usr/ - bin/ etc/ init linuxrc opt/ root/ sbin/ tmp var/ +```none +$ docker-machine ssh dev + ## . + ## ## ## == + ## ## ## ## === + /""""""""""""""""\___/ === + ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ + \______ o __/ + \ \ __/ + \____\______/ + _ _ ____ _ _ +| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __ +| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__| +| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | +|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_| +Boot2Docker version 1.4.0, build master : 69cf398 - Fri Dec 12 01:39:42 UTC 2014 +docker@boot2docker:~$ ls / +Users/ dev/ home/ lib/ mnt/ proc/ run/ sys/ usr/ +bin/ etc/ init linuxrc opt/ root/ sbin/ tmp var/ +``` + You can also specify commands to run remotely by appending them directly to the `docker-machine ssh` command, much like the regular `ssh` program works: - $ docker-machine ssh dev free - total used free shared buffers - Mem: 1023556 183136 840420 0 30920 - -/+ buffers: 152216 871340 - Swap: 1212036 0 1212036 +```none +$ docker-machine ssh dev free + +total used free shared buffers +Mem: 1023556 183136 840420 0 30920 +-/+ buffers: 152216 871340 +Swap: 1212036 0 1212036 +``` Commands with flags will work as well: - $ docker-machine ssh dev df -h - Filesystem Size Used Available Use% Mounted on - rootfs 899.6M 85.9M 813.7M 10% / - tmpfs 899.6M 85.9M 813.7M 10% / - tmpfs 499.8M 0 499.8M 0% /dev/shm - /dev/sda1 18.2G 58.2M 17.2G 0% /mnt/sda1 - cgroup 499.8M 0 499.8M 0% /sys/fs/cgroup - /dev/sda1 18.2G 58.2M 17.2G 0% - /mnt/sda1/var/lib/docker/aufs +```none +$ docker-machine ssh dev df -h + +Filesystem Size Used Available Use% Mounted on +rootfs 899.6M 85.9M 813.7M 10% / +tmpfs 899.6M 85.9M 813.7M 10% / +tmpfs 499.8M 0 499.8M 0% /dev/shm +/dev/sda1 18.2G 58.2M 17.2G 0% /mnt/sda1 +cgroup 499.8M 0 499.8M 0% /sys/fs/cgroup +/dev/sda1 18.2G 58.2M 17.2G 0% +/mnt/sda1/var/lib/docker/aufs +``` If you are using the "external" SSH type as detailed in the next section, you can include additional arguments to pass through to the `ssh` binary in the @@ -61,7 +70,9 @@ the command generated by Docker Machine). For instance, the following command will forward port 8080 from the `default` machine to `localhost` on your host computer: - $ docker-machine ssh default -L 8080:localhost:8080 +```bash +$ docker-machine ssh default -L 8080:localhost:8080 +``` ## Different types of SSH @@ -80,7 +91,9 @@ and Docker Machine will act sensibly out of the box. However, if you deliberately want to use the Go native version, you can do so with a global command line flag / environment variable like so: - $ docker-machine --native-ssh ssh dev +```bash +$ docker-machine --native-ssh ssh dev +``` There are some variations in behavior between the two methods, so please report any issues or inconsistencies if you come across them. diff --git a/machine/reference/start.md b/machine/reference/start.md index 0f3787f9ef..9080a703aa 100644 --- a/machine/reference/start.md +++ b/machine/reference/start.md @@ -11,14 +11,19 @@ title: start # start - Usage: docker-machine start [arg...] +```none +Usage: docker-machine start [arg...] - Start a machine +Start a machine + +Description: + Argument(s) are one or more machine names. +``` - Description: - Argument(s) are one or more machine names. For example: - $ docker-machine start dev - Starting VM... +```none +$ docker-machine start dev +Starting VM... +``` diff --git a/machine/reference/status.md b/machine/reference/status.md index 2fd048f235..d9160fb231 100644 --- a/machine/reference/status.md +++ b/machine/reference/status.md @@ -10,14 +10,18 @@ title: status # status - Usage: docker-machine status [arg...] +```none +Usage: docker-machine status [arg...] - Get the status of a machine +Get the status of a machine - Description: - Argument is a machine name. +Description: + Argument is a machine name. +``` For example: - $ docker-machine status dev - Running +``` +$ docker-machine status dev +Running +``` diff --git a/machine/reference/stop.md b/machine/reference/stop.md index e427b4c749..bfdde98abe 100644 --- a/machine/reference/stop.md +++ b/machine/reference/stop.md @@ -11,19 +11,26 @@ title: stop # stop - Usage: docker-machine stop [arg...] +```none +Usage: docker-machine stop [arg...] - Gracefully Stop a machine +Gracefully Stop a machine - Description: - Argument(s) are one or more machine names. +Description: + Argument(s) are one or more machine names. +``` For example: - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL - dev * virtualbox Running tcp://192.168.99.104:2376 - $ docker-machine stop dev - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL - dev * virtualbox Stopped +```none +$ docker-machine ls + +NAME ACTIVE DRIVER STATE URL +dev * virtualbox Running tcp://192.168.99.104:2376 + +$ docker-machine stop dev +$ docker-machine ls + +NAME ACTIVE DRIVER STATE URL +dev * virtualbox Stopped +``` diff --git a/machine/reference/upgrade.md b/machine/reference/upgrade.md index e911d5435c..0e87dc18fc 100644 --- a/machine/reference/upgrade.md +++ b/machine/reference/upgrade.md @@ -20,12 +20,15 @@ example, if the machine uses boot2docker for its OS, this command will download the latest boot2docker ISO and replace the machine's existing ISO with the latest. - $ docker-machine upgrade default - Stopping machine to do the upgrade... - Upgrading machine default... - Downloading latest boot2docker release to /home/username/.docker/machine/cache/boot2docker.iso... - Starting machine back up... - Waiting for VM to start... +```none +$ docker-machine upgrade default + +Stopping machine to do the upgrade... +Upgrading machine default... +Downloading latest boot2docker release to /home/username/.docker/machine/cache/boot2docker.iso... +Starting machine back up... +Waiting for VM to start... +``` > **Note**: If you are using a custom boot2docker ISO specified using > `--virtualbox-boot2docker-url` or an equivalent flag, running an upgrade on diff --git a/machine/reference/url.md b/machine/reference/url.md index 1c2cae972c..0e1ee9b97c 100644 --- a/machine/reference/url.md +++ b/machine/reference/url.md @@ -12,5 +12,7 @@ title: url Get the URL of a host - $ docker-machine url dev - tcp://192.168.99.109:2376 +```none +$ docker-machine url dev +tcp://192.168.99.109:2376 +```