Docker is an open source framework that provides a lighter-weight type of virtualization, using Linux containers rather than virtual machines. Built on traditional Linux distributions such as Red Hat Enterprise Linux and Ubuntu, Docker lets you package applications and services as images that run in their own portable containers and can move between physical, virtual, and cloud foundations without requiring any modification. If you build a Docker image on an Ubuntu laptop or physical server, you can run it on any compatible Linux, anywhere.
In this way, Docker allows for a very high degree of application portability and agility, and it lends itself to highly scalable applications. However, the nature of Docker also leans toward running a single service or application per container, rather than a collection of processes, such as a LAMP stack. That is possible, but we will detail here the most common use, which is for a single process or service.
[ First look: Docker 1.0 is ready for prime time | Prove your expertise with the free OS in InfoWorld's Linux admin IQ test round 1 and round 2. | Subscribe to InfoWorld's Data Center newsletter to stay on top of the latest developments. ]
Thus, in this guide, we'll install the Apache Web server into a Docker container and investigate how Docker operates along the way.
We'll use Ubuntu as the foundation of our Docker build. The Docker team itself uses Ubuntu for development, and Docker is supported on Ubuntu Server 12.04, 13.04, 13.10, and 14.04. The installation steps are slightly different for each version, so we will cover them all here.