Docker-machine with local driver using OS other than boot2docker


I want to mock up a docker swarm with flocker and do some development there as a proof of concept. I want to do this on my local windows machine (using virtualbox) and I want to manage it all with docker-machine because it’s so useful. This leads me to a set of requirement which I can’t seem to resolve, namely.

  1. Flocker requires ubuntu 14.04+ or Centos/Rhel 7+
  2. I want to do this locally on windows, which means running virtualbox and a VM
  3. Docker-machine only seems to create boot2docker instances when using a local driver without any option to change this.

Ideally I’d like to specify an ubuntu or centos image to docker-machine and then everything would work, but that doesn’t seem to be an option. The virtualbox driver has a --virtualbox-boot2docker-url option, can I point that to some sort of ubuntu/centos livecd which boots straight into a terminal as root (and if so does anyone have any recommendations?) Is there another way to specify a different OS to the virtualbox driver.

The other way I could see this going is to create a virtualbox instance with Vagrant and add it to docker-machine with the generic driver, but it seems like IP address changes for the virtual machine would be a problem in this case.

The virtualbox driver won’t be able to install ubuntu or debian for you.

The virtualbox driver works only with boot2docker or rancheros, which are both minimal distros built specifically for running docker.

Docker-machine does, however, have a generic driver. You can point the generic driver at an already running ubuntu, debian, or centos machine and it will install docker and make it available as a machine in docker-machine.

Essetially, I will manually install the system and set up a user with passwordless sudo and an ssh key. At that point, I can pretty much do something like:

docker-machine create -d generic --generic-ip-address --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user docker mydebian

More info about the generic driver can be found here: