Machine management for a container-centric world
FlorianLudwig and shin- openstack: don't fail when trying to delete non-existing keypair
Signed-off-by: Florian Ludwig <>
Latest commit b36cb27 Sep 20, 2018
Failed to load latest commit information.
.github Add PR template Jul 13, 2018
cmd/docker-machine Move cmd files under cmd/docker-machine to make it go-install-able Mar 4, 2018
commands Add emacs as option to env command --shell flag Apr 12, 2018
contrib/completion Update bash completion for `env --shell` May 4, 2018
docs updated README per vnext branch plan Oct 5, 2016
drivers openstack: don't fail when trying to delete non-existing keypair Sep 20, 2018
experimental Markdown linting Dec 8, 2015
its Update non-existent rm test Oct 3, 2017
libmachine Return error of command exec in SSH NativeClient Sep 19, 2018
mk Add OpenBSD/amd64 crossbuild to CI scripts Mar 15, 2018
script Update release version regex Feb 27, 2017
test Fix integrate tests of core commands cases Sep 20, 2018
vendor exoscale: upgrade to v0.9.23 Apr 30, 2018
version Fixed incorrect parsing of Boot2Docker ISO version (issue #4058). Oct 11, 2017
.dockerignore Rehauled build system and integration testing Sep 18, 2015
.gitignore fix invalid ignorance of bin directory Jul 13, 2018
.gitlab-ci.yml Add OpenBSD/amd64 crossbuild to CI scripts Mar 15, 2018
.godir Initial commit Dec 4, 2014
.travis.yml Add OpenBSD/amd64 crossbuild to CI scripts Mar 15, 2018 Update CHANGELOG - v0.15.0 Jun 12, 2018 Switching to go 1.10 Mar 20, 2018
Dockerfile Switching to go 1.10 Mar 20, 2018
Gopkg.lock Use latest docker/docker revision Sep 19, 2018
Gopkg.toml exoscale: upgrade to v0.9.23 Apr 30, 2018
LICENSE Initial commit Dec 4, 2014
MAINTAINERS Add Joffrey to maintainers file Oct 2, 2017
Makefile fix(Makefile): Prevent makefile from defaulting to using containers i… Dec 22, 2015 Support building a Linux ARM64/aarch64 binary Jan 21, 2017 readme: fix available driver plugins link Oct 19, 2016 Lint all Markdown documents Nov 27, 2015
appveyor.yml Fix Appveyor script to use new cmd location Mar 4, 2018
circle.yml Update the Go version used in circle.yml to 1.7. Mar 23, 2017
doc.go Lint, step 1 Nov 4, 2015

Docker Machine

Machine lets you create Docker hosts on your computer, on cloud providers, and inside your own data center. It creates servers, installs Docker on them, then configures the Docker client to talk to them.

It works a bit like this:

$ docker-machine create -d virtualbox default
Running pre-create checks...
Creating machine...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting VM...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: docker-machine env default

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER   ERRORS
default   -        virtualbox   Running   tcp://           v1.9.1

$ eval "$(docker-machine env default)"

$ docker run busybox echo hello world
Unable to find image 'busybox:latest' locally
511136ea3c5a: Pull complete
df7546f9f060: Pull complete
ea13149945cb: Pull complete
4986bf8c1536: Pull complete
hello world

In addition to local VMs, you can create and manage cloud servers:

$ docker-machine create -d digitalocean --digitalocean-access-token=secret staging
Creating SSH key...
Creating Digital Ocean droplet...
To see how to connect Docker to this machine, run: docker-machine env staging

$ docker-machine ls
NAME      ACTIVE   DRIVER         STATE     URL                         SWARM   DOCKER   ERRORS
default   -        virtualbox     Running   tcp://           v1.9.1
staging   -        digitalocean   Running   tcp://             v1.9.1

Installation and documentation

Full documentation is available here.


Want to hack on Machine? Please start with the Contributing Guide.

Driver Plugins

In addition to the core driver plugins bundled alongside Docker Machine, users can make and distribute their own plugin for any virtualization technology or cloud provider. To browse the list of known Docker Machine plugins, please see this document in our docs repo.


Docker Machine tries to do the right thing in a variety of scenarios but sometimes things do not go according to plan. Here is a quick troubleshooting guide which may help you to resolve of the issues you may be seeing.

Note that some of the suggested solutions are only available on the Docker Machine master branch. If you need them, consider compiling Docker Machine from source.

docker-machine hangs

A common issue with Docker Machine is that it will hang when attempting to start up the virtual machine. Since starting the machine is part of the create process, create is often where these types of errors show up.

A hang could be due to a variety of factors, but the most common suspect is networking. Consider the following:

  • Are you using a VPN? If so, try disconnecting and see if creation will succeed without the VPN. Some VPN software aggressively controls routes and you may need to manually add the route.
  • Are you connected to a proxy server, corporate or otherwise? If so, take a look at the --no-proxy flag for env and at setting environment variables for the created Docker Engine.
  • Are there a lot of host-only interfaces listed by the command VBoxManage list hostonlyifs? If so, this has sometimes been known to cause bugs. Consider removing the ones you are not using (VBoxManage hostonlyif remove name) and trying machine creation again.

We are keenly aware of this as an issue and working towards a set of solutions which is robust for all users, so please give us feedback and/or report issues, workarounds, and desired workflows as you discover them.

Machine creation errors out before finishing

If you see messages such as "exit status 1" creating machines with VirtualBox, this frequently indicates that there is an issue with VirtualBox itself. Please file an issue and include a link to a Github Gist with the output of the VirtualBox log (usually located at $HOME/.docker/machine/machines/machinename/machinename/Logs/VBox.log), as well as the output of running the Docker Machine command which is failing with the global --debug flag enabled. This will help us to track down which versions of VirtualBox are failing where, and under which conditions.

If you see messages such as "exit status 255", this frequently indicates there has been an issue with SSH. Please investigate your SSH configuration if you have one, and/or file an issue.

"You may be getting rate limited by Github" error message

In order to create or upgrade virtual machines running Docker, Docker Machine will check the Github API for the latest release of the boot2docker operating system. The Github API allows for a small number of unauthenticated requests from a given client, but if you share an IP address with many other users (e.g. in an office), you may get rate limited by their API, and Docker Machine will error out with messages indicating this.

In order to work around this issue, you can generate a token and pass it to Docker Machine using the global --github-api-token flag like so:

$ docker-machine --github-api-token=token create -d virtualbox newbox

This should eliminate any issues you've been experiencing with rate limiting.