2015-06-07 14:17:02 -07:00
|
|
|
<!--[metadata]>
|
|
|
|
|
+++
|
|
|
|
|
title = "Docker Machine"
|
|
|
|
|
description = "How to install Docker Machine"
|
|
|
|
|
keywords = ["machine, orchestration, install, installation, docker, documentation"]
|
|
|
|
|
[menu.main]
|
|
|
|
|
parent="mn_install"
|
|
|
|
|
weight=3
|
|
|
|
|
+++
|
|
|
|
|
<![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.
|
|
|
|
|
|
2015-09-02 13:42:13 -07:00
|
|
|
If you only want Docker Machine, you can install the Machine binaries (the
|
|
|
|
|
latest versions of which are located at
|
2015-11-27 10:16:42 +01:00
|
|
|
<https://github.com/docker/machine/releases/> ) directly by following the
|
2015-09-02 13:42:13 -07:00
|
|
|
instructions in the next section.
|
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-11-27 10:16:42 +01:00
|
|
|
2. Download the archive containing the Docker Machine binaries and extract them
|
|
|
|
|
to your PATH.
|
2015-06-07 14:17:02 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
Linux:
|
2015-10-21 11:07:00 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
$ curl -L https://github.com/docker/machine/releases/download/v0.5.0/docker-machine_linux-amd64.zip >machine.zip && \
|
|
|
|
|
unzip machine.zip && \
|
|
|
|
|
rm machine.zip && \
|
|
|
|
|
mv docker-machine* /usr/local/bin
|
2015-10-21 11:07:00 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
OSX:
|
2015-10-21 11:07:00 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
$ curl -L https://github.com/docker/machine/releases/download/v0.5.0/docker-machine_darwin-amd64.zip >machine.zip && \
|
|
|
|
|
unzip machine.zip && \
|
|
|
|
|
rm machine.zip && \
|
|
|
|
|
mv docker-machine* /usr/local/bin
|
2015-10-21 11:07:00 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
Windows (using Git Bash):
|
2015-10-21 11:07:00 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
$ curl -L https://github.com/docker/machine/releases/download/v0.5.0/docker-machine_windows-amd64.zip >machine.zip && \
|
|
|
|
|
unzip machine.zip && \
|
|
|
|
|
rm machine.zip && \
|
|
|
|
|
mv docker-machine* /usr/local/bin
|
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
|
|
|
|
|
|
|
|
$ docker-machine -v
|
|
|
|
|
machine version 0.5.0 (3e06852)
|
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
|
|
|
|
|
`/usr/local/etc/bash_completion.d` file. 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](https://github.com/docker/machine/tree/master/contrib/completion/bash).
|
|
|
|
|
|
2015-08-05 10:57:17 -07:00
|
|
|
## Where to go next
|
2015-06-07 14:17:02 -07:00
|
|
|
|
2015-11-27 10:16:42 +01:00
|
|
|
- [Docker Machine overview](index.md)
|
|
|
|
|
- [Docker Machine driver reference](drivers/index.md)
|
|
|
|
|
- [Docker Machine subcommand reference](reference/index.md)
|