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 on the docker/machine release page on GitHub.
Download the Docker Machine binary and extract it to your PATH.
If you are running on macOS:
$ curl -L https://github.com/docker/machine/releases/download/v0.12.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && \ chmod +x /usr/local/bin/docker-machine
If you are running on Linux:
$ curl -L https://github.com/docker/machine/releases/download/v0.12.2/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && chmod +x /tmp/docker-machine && sudo cp /tmp/docker-machine /usr/local/bin/docker-machine
If you are running with Windows with Git BASH:
$ if [[ ! -d "$HOME/bin" ]]; then mkdir -p "$HOME/bin"; fi && \ curl -L https://github.com/docker/machine/releases/download/v0.12.2/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" && \ chmod +x "$HOME/bin/docker-machine.exe"
The above command will work on Windows only if you use a terminal emulater such as Git BASH, which supports Linux commands like
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.12.2, build 9371605
The Machine repository supplies several
bash scripts that add features such as:
docker-machine usesubcommand to switch the active machine
To install the scripts, copy or link them into your
/usr/local/etc/bash_completion.d directory. To enable the
docker-machine shell prompt, add
$(__docker_machine_ps1) to your
PS1 setting in
PS1='[\u@\h \W$(__docker_machine_ps1)]\$ '
You can find additional documentation in the comments at the top of each script.
To uninstall Docker Machine:
Remove the executable:
rm $(which docker-machine)
Optionally, remove the machines you created.
To remove each machine individually:
docker-machine rm <machine-name>
To remove all machines:
docker-machine rm -f $(docker-machine ls -q)
© 2017 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.