You know a technology is going mainstream when Microsoft, Cisco, IBM, VMware and Red Hat all make big announcements about embracing it. Such is the case with containers.
But as containers have grown in popularity among developers during the past year, I still get asked by people, “What are containers?” There still seems to be some education needed about exactly what containers are and how they’re used. So, Cloud Chronicles and Network World give you Frequently Asked Questions (FAQ): Containers.
What are containers?
Containers can be thought of as a type of virtualization for the operating system. Typically virtualization refers to hardware, using a software hypervisor to slice up a server into multiple virtual machines. Container technology virtualizes the operating system, abstracting applications from their underlying OS.
Blogger Greg Ferro has a good summary on his blog:
“Containers virtualize at the operating system level, Hypervisors virtualize at the hardware level.
Hypervisors abstract the operating system from hardware, containers abstract the application from the operation system.
Hypervisors consumes storage space for each instance. Containers use a single storage space plus smaller deltas for each layer and thus are much more efficient.
Containers can boot and be application-ready in less than 500ms and creates new designs opportunities for rapid scaling. Hypervisors boot according to the OS typically 20 seconds, depending on storage speed.”
What’s the advantage of containers?
Containers have a couple of appealing qualities, most notably speed and portability. Containers are often described as “lightweight” because they don’t have to boot up an operating system like a virtual machine does - so, containers can be spun up very quickly. The other common advantage associated with containers is their portability; containers can run on top of a virtual machine, on physical or bare metal servers in a public cloud or on-premises - it doesn’t matter.
Are containers new?
No, not at all. The current hype is around Linux Containers, which have been around for more than 10 years. Before Linux containers, Unix had container technology. Even earlier systems from Oracle Solaris had the concept of Zones, which are basically an equivalent of containers.
Why all the hype now about containers?
As more new social, mobile and web-scale applications are being built, containers are seen as an emerging tool for developers to use in these types of applications because of the advantages outlined above. Concurrently, much of the hype about containers has been galvanized by the rise of a company named Docker, which is attempting to commercialize an open source project of the same name that automates the deployment of an application as a container. Basically as interest in containers is growing, companies like Docker and others are making containers easier to use.
What does Docker do?
Docker is an open source tool for packaging applications inside containers; Docker is basically used to make containers. Docker also has what’s called the Docker Hub, which is a registry of containers that have been developed to be used with specific programs, such as MongoDB, Redis, Node.js and others.
Are containers a replacement for virtual machines?
This one depends on who you ask. Some believe that containers offer a better way to run certain applications compared to just running them on a virtual machines. Generally, the theory is that in an environment with multiple operating systems (Windows and Linux for example), virtual machines are helpful. In a heterogeneous OS environment (all Linux), containers could be more helpful. It also depends on the application. In some circumstances a developer may want a dedicated virtual machine, or perhaps even a whole physical server for running an application. In other situations, a VM can be a good platform for running containers and yet in other scenarios containers could be best to run on bare metal servers.
Kubernetes is an open source project created by Google that specializes in cluster management. Part of its functionality includes being able to manage Docker, which creates containers. So, think of Docker as an engine for creating containers, and Kubernetes as a tool for managing the scheduling of containers or groups of containers.