Source repo for Docker's Documentation
Go to file
Misty Stanley-Jones 29f7d3396b Initial import of https://github.com/docker/machine 2016-09-28 20:44:12 -07:00
Godeps Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
apidocs Moved docker-trusted-registry imported docs to apidocs and docker-trusted-registry subdirectories 2016-09-28 14:29:59 -07:00
cmd Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
commands Add tcsh support to --shell 2016-05-04 20:29:07 -07:00
compose Moved compose docs to compose subdirectory 2016-09-28 14:52:24 -07:00
contrib/completion Moved compose docs to compose subdirectory 2016-09-28 14:52:24 -07:00
cs-engine Moved cs-engine docs to the cs-engine subdirectory 2016-09-28 14:19:05 -07:00
docker-for-mac Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
docker-for-windows Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
docker-hub Move docker-hub docs to docker-hub subdirectory 2016-09-28 14:37:27 -07:00
docker-store Move docker-store docs to docker-store subdirectory 2016-09-28 14:40:26 -07:00
docker-trusted-registry Moved docker-trusted-registry imported docs to apidocs and docker-trusted-registry subdirectories 2016-09-28 14:29:59 -07:00
docs Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
drivers azure: increase log level for info statement 2016-08-18 16:11:40 -07:00
experimental Move swarm docs to swarm subdirectory 2016-09-28 14:54:30 -07:00
images Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
its FIX #2939 Integration tests for ls headers 2016-01-27 09:38:40 +01:00
kitematic Move kitematic docs to kitematic subdirectory 2016-09-28 16:46:17 -07:00
libmachine Move generated systemd unit file closer to upstream 2016-08-18 16:11:54 -07:00
mk FIX #3051 Use golang 1.6 2016-02-18 08:51:30 +01:00
notary Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
opensurce Move opensource docs to opensource subdirectory 2016-09-28 16:42:34 -07:00
registry Moved registry docs to registry subdirectory 2016-09-28 14:46:28 -07:00
script Move toolbox docs to toolbox subdirectory 2016-09-28 16:39:30 -07:00
swarm Move swarm docs to swarm subdirectory 2016-09-28 14:54:30 -07:00
test Move swarm docs to swarm subdirectory 2016-09-28 14:54:30 -07:00
toolbox Move toolbox docs to toolbox subdirectory 2016-09-28 16:39:30 -07:00
ucp Moved imported orca docs into ucp directory 2016-09-28 14:35:02 -07:00
vendor Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
version Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
.arcconfig Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.babelrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.dockercfg.template Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.dockerignore Initial import of https://github.com/docker/opensource 2016-09-28 16:41:17 -07:00
.drone.yml Initial commit -f https://github.com/docker/orca 2016-09-28 14:33:25 -07:00
.editorconfig Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.eslintignore Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.eslintrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.flowconfig Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.gitmodules Initial import of https://github.com/docker/dhe-engine 2016-09-28 14:25:04 -07:00
.htmllintrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.lfsconfig Initial import of https://github.com/docker/pinata 2016-09-28 20:36:30 -07:00
.npmrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.pre-commit-config.yaml Tests use updated get_config_paths_from_options signature 2016-03-24 10:57:01 -07:00
.stylelintrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
CHANGELOG.md Move notary docs to notary subdirectory 2016-09-28 16:35:14 -07:00
CONTRIBUTING.md Move kitematic docs to kitematic subdirectory 2016-09-28 16:46:17 -07:00
Dockerfile Move opensource docs to opensource subdirectory 2016-09-28 16:42:34 -07:00
LICENSE Move kitematic docs to kitematic subdirectory 2016-09-28 16:46:17 -07:00
MAINTAINERS Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
Makefile Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
Makefile.inc Fix for #2244 2015-11-12 13:49:43 +01:00
README.md Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
ROADMAP.md Move kitematic docs to kitematic subdirectory 2016-09-28 16:46:17 -07:00
appveyor.yml Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
circle.yml Initial import of https://github.com/docker/pinata 2016-09-28 20:40:01 -07:00
doc.go Moved registry docs to registry subdirectory 2016-09-28 14:46:28 -07:00

README.md

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://192.168.99.188:2376           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://192.168.99.188:2376           v1.9.1
staging   -        digitalocean   Running   tcp://203.0.113.81:2376             v1.9.1

Installation and documentation

Full documentation is available here.

Contributing

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 repo.

Troubleshooting

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.