rancher/machine

Name: machine

Owner: Rancher

Description: Machine management for a container-centric world

Forked from: docker/machine

Created: 2018-01-17 17:52:39.0

Updated: 2018-05-24 21:05:30.0

Pushed: 2018-05-24 21:41:08.0

Homepage: https://docs.docker.com/machine/

Size: 18818

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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:

cker-machine create -d virtualbox default
ing pre-create checks...
ting machine...
ault) Creating VirtualBox VM...
ault) Creating SSH key...
ault) Starting VM...
ing for machine to be running, this may take a few minutes...
ine is running, waiting for SSH to be available...
cting operating system of created instance...
cting the provisioner...
isioning with boot2docker...
ing certs to the local machine directory...
ing certs to the remote machine...
ing Docker configuration on the remote daemon...
king connection to Docker...
er is up and running!
ee how to connect Docker to this machine, run: docker-machine env default

cker-machine ls
      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER   ERRORS
ult   -        virtualbox   Running   tcp://192.168.99.188:2376           v1.9.1

al "$(docker-machine env default)"

cker run busybox echo hello world
le to find image 'busybox:latest' locally
36ea3c5a: Pull complete
46f9f060: Pull complete
149945cb: Pull complete
bf8c1536: Pull complete
o world

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

cker-machine create -d digitalocean --digitalocean-access-token=secret staging
ting SSH key...
ting Digital Ocean droplet...
ee how to connect Docker to this machine, run: docker-machine env staging

cker-machine ls
      ACTIVE   DRIVER         STATE     URL                         SWARM   DOCKER   ERRORS
ult   -        virtualbox     Running   tcp://192.168.99.188:2376           v1.9.1
ing   -        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 docs 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:

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:

cker-machine --github-api-token=token create -d virtualbox newbox

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.