Docker Machine
Machine lets you create Docker hosts on your computer, on cloud providers, andinside your own data center. It automatically creates hosts, installs Docker onthem, then configures the docker
client to talk to them. A “machine” is thecombination of a Docker host and a configured client.
Once you create one or more Docker hosts, Docker Machine supplies a number ofcommands for managing them. Using these commands you can
- start, inspect, stop, and restart a host
- upgrade the Docker client and daemon
- configure a Docker client to talk to your host
Looking for the installation docs?
For Windows or Mac, you can obtain Docker Machine by installing the DockerToolbox. To read instructions for installingMachine on Linux or for installing Machine alone without Docker Toolbox, see theMachine installation instructions.
Understand Docker Machine basic concepts
Docker Machine allows you to provision Docker on virtual machines that resideeither on your local system or on a cloud provider. Docker Machine creates ahost on a VM and you use the Docker Engine client as needed to build images andcreate containers on the host.
To create a virtual machine, you supply Docker Machine with the name of thedriver you want use. The driver represents the virtual environment. For example,on a local Linux, Mac, or Windows system the driver is typically Oracle VirtualBox. For cloud providers, Docker Machine supports drivers such as AWS, MicrosoftAzure, Digital Ocean and many more. The Docker Machine reference includes acomplete list of the supported drivers.
Since Docker runs on Linux, each VM that Docker Machine provisions relies on abase operating system. For convenience, there are default base operatingsystems. For the Oracle Virtual Box driver, this base operating system is theboot2docker.iso
. For drivers used to connect to cloud providers, the baseoperating system is Ubuntu 12.04+. You can change this default when you create amachine. The Docker Machine reference includes a complete list of the supportedoperating systems.
For each machine you create, the Docker host address is the IP address of theLinux VM. This address is assigned by the docker-machine create
subcommand.You use the docker-machine ls
command to list the machines you have created.The docker-machine ip <machine-name>
command returns a specific host’s IPaddress.
Before you can run a docker
command on a machine, you configure yourcommand-line to point to that machine. The docker-machine env <machine-name>
subcommand outputs the configuration command you should use. When you run acontainer on the Docker host, the container’s ports map to ports on the VM.
For a complete list of the docker-machine
subcommands, see the Docker Machinesubcommand reference.
Crash Reporting
Provisioning a host is a complex matter that can fail for a lot of reasons.Your workstation may have a wide variety of shell, network configuration, VPN,proxy or firewall issues. There are also reasons from the other end of thechain: your cloud provider or the network in between.
To help docker-machine
be as stable as possible, we added a monitoring ofcrashes whenever you try to create
or upgrade
a host. This will send, overHTTPS, to Bugsnag some information about your docker-machine
version, build,OS, ARCH, the path to your current shell and, the history of the last command asyou could see it with a --debug
option. This data is sent to help us pinpointrecurring issues with docker-machine
and will only be transmitted in the caseof a crash of docker-machine
.
If you wish to opt out of error reporting, you can create a no-error-report
file in your $HOME/.docker/machine
directory, and Docker Machine will disablethis behavior. e.g.:
$ mkdir -p ~/.docker/machine && touch ~/.docker/machine/no-error-report
Leaving the file empty is fine – Docker Machine just checks for its presence.
Getting help
Docker Machine is still in its infancy and under active development. If you needhelp, would like to contribute, or simply want to talk about the project withlike-minded individuals, we have a number of open channels for communication.
- To report bugs or file feature requests: please use the issue tracker onGithub.
- To talk about the project with people in real time: please join the
#docker-machine
channel on IRC. - To contribute code or documentation changes: please submit a pull request onGithub.
For more information and resources, please visitour help page.
Where to go next
- Install a machine on your local system using VirtualBox.
- Install multiple machines on your cloud provider.
- Docker Machine driver reference
- Docker Machine subcommand reference