WIP: rewrite of Machine overview for clarity, add diagrams rewrite/re-organize Machine topics; incl. get started on local VM, menu order, titles replaced Swarm info in cloud doc to reference new Swarm provisioning topic per @moxigirl, incorporated review comments per Chanwit into Concepts topic added mention of Swarm clusters to Overview, and links to Swarm topics in What's next for Overview and Concepts updates to concepts per @bfirsh comments updated cloud provisioning topic to illustrated, step-by-step version added for cloud installs per issue #18282 cleanup of links, copy-edits update to concepts, added link to boot2docker repo and re-worded per Nathan's comments updates to concepts and cloud example per @dmp42 comments updated for links and improved intro content for cloud topic Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
3.2 KiB
Install Docker Machine
On OS X and Windows, Machine is installed along with other Docker products when you install the Docker Toolbox. For details on installing Docker Toolbox, see the Mac OS X installation instructions or Windows installation instructions.
If you want only Docker Machine, you can install the Machine binaries directly by following the instructions in the next section. You can find the latest versions of the binaries are on the docker/machine release page on GitHub.
Installing Machine Directly
-
Install the Docker binary.
-
Download the Docker Machine binary and extract it to your PATH.
If you are running OS X or Linux:
$ curl -L https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-`uname -s`-`uname -m` > /usr/local/bin/docker-machine && \ chmod +x /usr/local/bin/docker-machineIf you are running Windows with git bash
$ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \ curl -L https://github.com/docker/machine/releases/download/v0.6.0/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && \ chmod +x "$HOME/bin/docker-machine.exe"Otherwise, download one of the releases from the docker/machine release page directly.
-
Check the installation by displaying the Machine version:
$ docker-machine version docker-machine version 0.6.0, build 61388e9
Installing bash completion scripts
The Machine repository supplies several bash scripts that add features such
as:
- command completion
- a function that displays the active machine in your shell prompt
- a function wrapper that adds a
docker-machine usesubcommand to switch the active machine
To install the scripts, copy or link them into your /etc/bash_completion.d or
/usr/local/etc/bash_completion.d directory. To enable the docker-machine shell
prompt, add $(__docker_machine_ps1) to your PS1 setting in ~/.bashrc.
PS1='[\u@\h \W$(__docker_machine_ps1)]\$ '
You can find additional documentation in the comments at the top of each script.
Where to go next
- Docker Machine overview
- Create and run a Docker host on your local system using VirtualBox
- Provision multiple Docker hosts on your cloud provider
- Docker Machine driver reference
- Docker Machine subcommand reference