InfoWorld how-to's

How-to: Get started with Docker

FREE

Become An Insider

Sign up now and get free access to hundreds of Insider articles, guides, reviews, interviews, blogs, and other premium content from the best tech brands on the Internet: CIO, CITEworld, CSO, Computerworld, InfoWorld, ITworld and Network World. Learn more.

Docker makes virtualization light, easy, and portable; follow this step-by-step guide from installing Docker to building a Docker container for the Apache Web server

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.

Thus, in this guide, we'll install the Apache Web server into a Docker container and investigate how Docker operates along the way.

Installing Docker
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.

From a fresh installation of Ubuntu 12.04, we will need to follow these steps to make sure we have the proper kernel version and associated headers:

$ sudo apt-get update
$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

To continue reading, please begin the free registration process or sign in to your Insider account by entering your email address:
Mobile Security Insider: iOS vs. Android vs. BlackBerry vs. Windows Phone
Join the discussion
Be the first to comment on this article. Our Commenting Policies