Docker and Hyper-V
I suspect that containers1 hold some promise for automation of development processes, particularly build and test steps.2 Obviously if your software is being deployed in containers then containers will be integral to your development workflow, but I think that even if you deploy to some other environment, containers may be useful as transient environment for various automated tasks.
I plan to investigate containers more fully, and hope to write about ways to use them for automated tasks. To start up the learning curve I decided to focus on Docker containers.
The Docker Toolbox is currently the most convenient way for developers to provision their development system with Docker. If you are using OS X or Windows, you won’t have containers available natively on your system. To work around that, Docker Toolbox installs Oracle’s VirtualBox so you can run a Linux VM that does have container support.
That’s great for OS X, but not necessarily great for Windows. If you are like many Windows developers, you are running Hyper-V on your system and making good use of it. But Hyper-V and VirtualBox cannot both be active at the same time.
It used to be, back in the boot2docker
days,3 that you’d have to make a Windows boot option that let you select either Hyper-V or VirtualBox on boot. But now there are Hyper-V drivers for the Docker Machine utility, and we can provision Hyper-V VMs from a Windows command line using docker-machine
. We no longer need to use VirtualBox with Docker on Windows.
I’ve posted the details of how to work with Docker Machine and Hyper-V in an article: Using Docker Toolbox with Hyper-V on Windows 10.
-
Containers are a lightweight virtualization mechanism and run in the user space of the OS. See this Wikipedia entry on Operating System Level Virtualization for pointer to more info. And also this Network World article listing production uses of various container technologies. ↩
-
Here is a blog post describing the use of a Docker container to run a Maven build. ↩
-
boot2docker is the predecessor to the Docker Toolbox. It was good, but a lot of extra steps were needed to install everything needed. Docker Toolbox bundles many of the Docker tools (like Compose and Swarm and Kitematic) and will be adapted to each OS (Linux, OS X, Windows). See the announcement (Aug 2015) for details. ↩
- show comments