Glossary termConcept

Container

Also known as: Software container, Linux container

Lightweight, isolated package that bundles an application with its dependencies and configuration so it runs consistently across environments.

A container is a standard unit of software that packages code together with the libraries, runtime and settings it needs, then runs it as an isolated process on a host operating system. Unlike a virtual machine, a container does not include its own kernel: all containers on a host share the host's kernel, which makes them faster to start and lighter on memory and disk. From the inside, a container appears to have its own file system, process tree and network interfaces, even though the host sees it as an ordinary process.

On Linux, containers are assembled from several kernel features rather than a single mechanism. Namespaces give a process its own view of resources such as process IDs, mount points, users and networking, while control groups (cgroups) limit how much processor time, memory and input and output it may consume. Earlier forms of isolation include the Unix chroot call, Solaris Zones and FreeBSD jails, introduced in 2000. Docker, launched by Solomon Hykes and the company dotCloud in 2013, made containers practical for everyday developers by pairing a simple command-line workflow with a shareable image format.

Containers changed how software is shipped: the same container image can run on a laptop, a test server and a production cluster, reducing problems caused by differences between environments. They also suit microservices, where many small services are deployed independently. Their isolation is weaker than that of virtual machines, because a kernel vulnerability can affect every container on a host, so security-sensitive deployments add measures such as running without root privileges, restricting system calls or placing containers inside lightweight virtual machines. Standards from the Open Container Initiative, founded in 2015, keep image and runtime formats interoperable across tools.

Key points

  • Containers share the host's kernel, so they start quickly and use fewer resources than virtual machines.
  • Linux containers rely on namespaces for isolation and control groups for resource limits.
  • Docker popularized containers from 2013 by combining an easy workflow with portable images.
  • Isolation between containers is weaker than between virtual machines, so hardening still matters.

From the source

...containers are isolated processes for each of your app's components. Each component [...] runs in its own isolated environment, completely isolated from everything else on your machine.

Source: Docker Docs (opens in a new tab)

Related entries

Technology

Docker Engine

DevOpsFOSS

Open-source container runtime and toolset that builds, ships and runs applications in isolated Linux containers from portable images.

Technology

Kubernetes

DevOpsFOSS

Open-source system for automating deployment, scaling and management of containerized applications across clusters of machines.

Glossary term

Immutable, layered package of an application's files, dependencies and metadata that serves as the template from which containers are started.

Glossary term

Software implementation of a computer that runs its own operating system or programs in isolation from the physical hardware beneath it.

Glossary term

Automated coordination of multiple services, containers or tasks, handling deployment, scaling, networking and recovery so systems run reliably.

Glossary term

Microservices

ProgrammingDevOps

Architectural style that builds an application as a suite of small, independently deployable services, each running its own process and owning its data.

Glossary term

Sandboxing

Cybersecurity

Security technique that runs programs in a restricted, isolated environment so that malicious or faulty code cannot harm the rest of the system.

Person

Software engineer and entrepreneur who created Docker, the tool that popularized software containers, and later co-founded the company Dagger.

Featured in guides

Referenced by

Other entries that discuss or point to Container.