2015-06-07 14:17:02 -07:00
<!--[metadata]>
+++
2016-01-24 13:09:31 -08:00
title = "Install Machine"
2015-06-07 14:17:02 -07:00
description = "How to install Docker Machine"
keywords = ["machine, orchestration, install, installation, docker, documentation"]
[menu.main]
2016-01-24 13:09:31 -08:00
parent="workw_machine"
weight=-80
2015-06-07 14:17:02 -07:00
+++
<![end-metadata]-->
2015-08-05 10:57:17 -07:00
# Install Docker Machine
2015-06-07 14:17:02 -07:00
2015-09-11 15:47:22 -07:00
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 <a href="https://docs.docker.com/installation/mac/" target="_blank">Mac OS X
installation</a> instructions or <a
href="https://docs.docker.com/installation/windows" target="_blank">Windows
installation</a> instructions.
2016-01-28 13:05:21 -08:00
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 <a href="https://github.com/docker/machine/releases/" target="_blank"> docker/machine release page</a> on GitHub.
2015-06-07 14:17:02 -07:00
2015-09-02 13:42:13 -07:00
## Installing Machine Directly
2015-06-07 14:17:02 -07:00
2015-11-27 10:16:42 +01:00
1. Install <a href="https://docs.docker.com/installation/"
target="_blank">the Docker binary</a>.
2015-06-07 14:17:02 -07:00
2015-12-14 17:55:04 +01:00
2. Download the Docker Machine binary and extract it to your PATH.
2015-06-07 14:17:02 -07:00
2016-01-25 12:07:10 +01:00
If you are running OS X or Linux:
2015-10-21 11:07:00 -07:00
2016-01-25 12:07:10 +01:00
$ 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-machine
2015-10-21 11:07:00 -07:00
2016-01-25 12:07:10 +01:00
If you are running Windows with git bash
2015-10-21 11:07:00 -07:00
2016-01-25 12:07:10 +01:00
$ 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"
2015-10-21 11:07:00 -07:00
2016-01-28 13:05:21 -08:00
Otherwise, download one of the releases from the <a href="https://github.com/docker/machine/releases/" target="_blank"> docker/machine release page</a> directly.
2015-10-21 11:07:00 -07:00
2015-11-27 10:16:42 +01:00
3. Check the installation by displaying the Machine version:
2015-10-21 11:07:00 -07:00
2015-11-27 18:32:13 +01:00
$ docker-machine version
2016-01-25 12:07:10 +01:00
docker-machine version 0.6.0, build 61388e9
2015-09-11 15:47:22 -07:00
2015-10-15 19:25:20 -04:00
## Installing bash completion scripts
The Machine repository supplies several `bash` scripts that add features such
as:
2015-11-27 10:16:42 +01:00
- command completion
- a function that displays the active machine in your shell prompt
- a function wrapper that adds a `docker-machine use` subcommand to switch the
active machine
2015-10-15 19:25:20 -04:00
To install the scripts, copy or link them into your `/etc/bash_completion.d` or
2016-01-03 17:38:06 +01:00
`/usr/local/etc/bash_completion.d` directory. To enable the `docker-machine` shell
2016-01-04 15:20:37 +05:30
prompt, add `$(__docker_machine_ps1)` to your `PS1` setting in `~/.bashrc` .
2015-10-15 19:25:20 -04:00
2016-01-04 15:20:37 +05:30
PS1='[\u@\h \W$(__docker_machine_ps1)]\$ '
2015-10-15 19:25:20 -04:00
2016-01-28 13:05:21 -08:00
You can find additional documentation in the comments at the <a href="https://github.com/docker/machine/tree/master/contrib/completion/bash" target="_blank">top of each script</a>.
2015-10-15 19:25:20 -04:00
2015-08-05 10:57:17 -07:00
## Where to go next
2015-06-07 14:17:02 -07:00
2016-01-28 13:05:21 -08:00
- [Docker Machine overview ](overview.md )
- Create and run a Docker host on your [local system using VirtualBox ](get-started.md )
- Provision multiple Docker hosts [on your cloud provider ](get-started-cloud.md )
- <a href="https://docs.docker.com/machine/drivers/" target="_blank">Docker Machine driver reference</a>
- <a href="https://docs.docker.com/machine/reference/" target="_blank">Docker Machine subcommand reference</a>