First look: Docker is a better way to deploy your apps
An open source Linux container engine taking the world by storm is the newest, leanest, and cleanest way to get your app from development to productionFollow @peterwayner
A long time ago, a computer program was a stack of punch cards, and moving the program from computer to computer was easy as long as you didn't drop the box. Every command, instruction, and subroutine was in one big, fat deck. Editors, compilers, and code repositories have liberated us from punch cards, but somehow deploying software has grown more complicated. Moving a program from the coding geniuses to the production team is fraught with errors, glitches, and hassles. There's always some misconfiguration, and it's never as simple as carrying that deck down the hall.
Into this world comes open source Docker, the latest layer of virtualization to bundle everything together in a stable package or, in the current parlance, "container." (If the computer industry ever runs out of synonyms for "box," we're in big trouble.) The software opens up the process of creating and building virtual machines to anyone who can work with the Linux command line. You put the instructions for starting up your machine in one file called the Dockerfile, issue the
build command, and voilà, your new machine is running in its own Shangri-La or Private Idaho or La-La Land. (Choose your own metaphor.)
If you take the right steps down the path to creating a Dockerfile, the results can be incredible. I whipped up a few virtual machines in a few minutes, and the building and deploying process was lightning quick. Anyone who has waited for other virtualization layers to start up will be surprised by how quickly you can type
docker run and watch the virtual machine spring to life. This might be because Docker containers are typically more lightweight than traditional virtual machines. I suspect it might also be because everything runs from the command line. There are no mouse clicks to distract Docker. It's all about communicating with other machines through shell scripts, not those pesky humans who need cute icons in their GUIs.
Life with Docker is tightly integrated with the Linux command line. Docker depends entirely upon the hooks for containers in the newer versions of the Linux kernel, which allow isolated bundles of apps, services, and the libraries they depend on to live side by side on the Linux host. The Linux kernel team did most of the clever work, and now Docker is making it easy for people to access the power. The simplest way to use it is with a newer version of Ubuntu (say, 12.04) or one of the close cousins. There are instructions for using Docker with Mac OS X or Windows, but they involve installing VirtualBox and running the Linux kernel in a virtual machine.