Docker Cloud is a proxy for the Docker API which automatically creates and destroys cloud virtual machines to run your docker containers.
If you are running Docker on OS X or Windows, there is no longer any need to install a virtualization layer like vagrant on your machine. You can simply run it in the cloud. Additionally, if you want to easily turn up and down containers into a cloud workspace that lasts longer than your laptop, this is also straightforward.
For now only Google Compute Engine, but the code is factored in such a way to make it easy to add other cloud providers.
I'm glad you asked.
git clone https://github.com/brendandburns/docker-cloud.git
go get github.com/brendandburns/docker-cloud
There are different instructions for different cloud providers.
If you don't already have a Google Cloud Project, you can get one on the Google Cloud Console
Create a new Client ID for Installed Application in the APIs/credentials section.
Assuming $GOPATH/bin
is in your $PATH
:
docker-cloud -project <your-google-cloud-project-here> -id <your-credentials-client-id> -secret <your-credentials-secret>
The first time you run the proxy, you will receive a URL and be prompted to visit it to obtain an authorization code. Once you do this, run the proxy again:
docker-cloud -project <your-google-cloud-project-here> -code <auth-code-here>
The code will be cached, and you should never have to do go through that step again and can simple call:
docker-cloud -project <your-google-cloud-project-here>
Use the -H
flag on your docker client to connect to the proxy:
docker -H tcp://localhost:8080 run ehazlett/tomcat7