Docker

From Pulsed Media Wiki

Docker

Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own application, libraries, and configuration files; they can communicate with each other through well-defined channels. Because all the bundled components are in one package, the developer can be assured that the software will run the same on any machine.

Docker provides an additional layer of abstraction and automation of OS-level virtualization on Linux, and initially used the LXC (Linux Containers) technology. However, it later switched to its own technology, `libcontainer`, which was later renamed to `runC`.

While OS-level virtualization is not new (dating back to technologies like chroot, FreeBSD Jails, and Solaris Containers/Zones), Docker popularized the concept and simplified its use through tools, APIs, and a widely adopted container image format.

Concepts

Docker uses a client-server architecture. The Docker client talks to the Docker daemon (which manages Docker objects like images, containers, volumes, and networks). The Docker daemon listens for Docker API requests.

Key concepts in Docker include:

How it Works

Docker leverages specific features of the Linux kernel (and similar features on other operating systems via Virtualization):

Benefits

Drawbacks and Criticisms

History

Docker was launched in March 2013 by Docker, Inc., based on the internal project DotCloud, a PaaS company. Docker leveraged existing work on cgroups and Linux namespaces and was built on top of LXC.

In 2015, Docker, Inc. initiated the Open Container Project (later renamed the Open Container Initiative, OCI) to create open industry standards for container formats and runtimes, contributing its `libcontainer` runtime (renamed `runC`) and image format specification. This move helped standardize the container Ecosystem.

Over the years, Docker's popularity grew significantly, becoming a key technology in the DevOps, Microservices, and cloud-native movements.

Comparison to Virtual Machines

Comparison between Docker Containers and Virtual Machines
Feature Docker Containers Virtual Machines
Technology OS-level virtualization Hardware virtualization
Isolation Process/FS/Network (shared kernel) Full Hardware Emulation (separate kernel)
Resource Usage Lower overhead, more efficient Higher overhead (full guest OS)
Startup Time Seconds Minutes
Size MB to GB GBs
Operating System Shares host OS kernel, runs apps Full guest OS installed and booted
Portability Application-level (consistent env) OS-level (can run different OS on different VMs)
Primary Use Packaging/Running applications Running full OS environments, different OSes

Use Cases

Containerization using Docker is suitable for a wide range of applications and workflows:

See Also

References