Docker Community Forums

Share and learn in the Docker community.

Making platform-agnostic development env


(Oscar) #1

Should I use boot2docker when creating a platform-agnostic development environment on OS X?

I feel like I should not use it, as it’s using VirtualBox.

And when we want to develop in the same environment as production, why do we need VirtualBox at all?


(Jeff Anderson) #2

Docker is designed to run anywhere that a 64-bit linux kernel can run. Since OSX doesn’t include a 64-bit linux kernel, hence the need for a virtual machine to provide that.

In production, you’d definitely skip virtualbox altogether and run your 64-bit linux kernel + docker on a production VM hypervisor or bare metal.

These days, you won’t want to use the boot2docker cli, as it’s been marked as deprecated for some time now. The docker-machine project is what you’ll want to use. It can provision a boot2docker host (the boot2docker project was initially both a CLI and a minimal OS distro, but now is primarily just the OS distro) The docker-machine tool can also provision docker in other virtual machine providers such as aws, rackspace, digitalocean, and others.

You could use docker-machine for both dev and production, and change only where you provision the docker machines (local vbox vs aws) depending on whether you are provisioning a dev or prod docker host.

Cheers!