# Container

A packaged application process with its dependencies and isolated runtime configuration, sharing the host operating-system kernel.

- Type: term
- Domain: Engineering & architecture
- Level: Foundational
- Last reviewed: 2026-09-24
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/container/>)

## What it means

A software container packages an application and its runtime dependencies into an image that a container runtime starts as an isolated process. Operating-system mechanisms separate files, processes, networking, and resource use while containers share the host kernel. An image is the packaged template; a container is a running or stopped instance of it.

## Why it matters

Containers make application environments more repeatable across development and deployment and provide a standard unit for scheduling, scaling, and replacement. They do not remove environment differences or operational work, but they make many dependencies explicit and automatable.

## When to use it

Use containers when consistent packaging, process isolation, rapid replacement, or orchestration supports the delivery model. A simple process, managed function, platform service, or virtual machine may be more appropriate when container tooling adds no useful portability or control.

## How it works

1. Describe the application filesystem, runtime, dependencies, entry point, and non-secret defaults in an image definition.
2. Build an immutable image and identify it with a content digest or controlled version.
3. Store and scan the image in a registry with provenance and access controls.
4. Run the image with explicit configuration, secrets, network, storage, and resource limits.
5. Replace containers with new image instances for deployment instead of modifying them in place.
6. Observe process health and retain important data outside the disposable container filesystem.

## A practical example

A team packages an API and its language runtime in one image. Development, testing, and production run the same digest with different injected configuration; deployments replace instances gradually, while uploaded files remain in external object storage.

## Where it breaks

Containers share a kernel and are not the same isolation boundary as virtual machines. Images can contain vulnerabilities and become large or irreproducible. Stateful storage, networking, secrets, scheduling, and patching still require deliberate platform operation.

## Common mistakes

- Using image and container as synonyms.
- Baking credentials or environment-specific configuration into an image.
- Writing important state only to the disposable container filesystem.
- Running without resource limits, image provenance, or a patching process.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/container/#visualization-container>)

## Sources

1. [Open Container Initiative Runtime Specification](<https://github.com/opencontainers/runtime-spec>) — Open Container Initiative · Open standard
2. [What Is a Container?](<https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-a-container/>) — Docker Docs · Official technical documentation

## Related topics

- [Cloud Computing](<https://wiki.soroush.uk/topic/cloud-computing/>)
- [Continuous Delivery](<https://wiki.soroush.uk/topic/continuous-delivery/>)
- [CI/CD Pipeline](<https://wiki.soroush.uk/topic/cicd-pipeline/>)
