Home › Categories › Tools & Ecosystem › Docker

Docker

From WikiTech, the encyclopedia of technology

Technology · Tools & Ecosystem · 5 min read · 986 words · Updated

Docker
Technology
Docker — article photograph or illustration
Image placeholderPlace the file shown below in the assets/articles folder
File: docker.webp
Original authorSolomon Hykes
Initial releaseMarch 2013
Written inGo
Based onLinux namespaces, cgroups

Docker is a set of tools for packaging an application and its dependencies into a container image and running it as an isolated process.

History

Solomon Hykes presented Docker in March 2013 at PyCon; it grew out of internal technology at dotCloud. The Open Container Initiative was formed in 2015 to standardise image and runtime formats.

Architecture

Docker uses Linux kernel features: namespaces isolate what a process can see (processes, network, mounts) and control groups (cgroups) limit resources. Images are built from layers stored in a union filesystem.

FROM python:3.12-slim
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python", "main.py"]

Key mechanisms

A Dockerfile lists build steps. Each step creates a layer that can be cached and reused. Registries such as Docker Hub store and distribute images.

Adoption

Containers are standard in CI pipelines, development environments and cloud deployments, frequently orchestrated by Kubernetes.

Ecosystem

Containers share the host kernel, which makes them lighter than virtual machines but gives weaker isolation.

Images, containers and registries

A container image is a packaged filesystem and metadata description used to create a container. It is usually assembled from read-only layers. A container adds a writable layer and runtime configuration when it starts. Because layers can be shared between images, a machine does not need to store a complete independent copy of every common base filesystem. Registries distribute these image layers and manifests so that development machines and production servers can retrieve the same build artifact.

A container is not a miniature virtual machine. It is a process, or group of processes, that uses the host operating system kernel while receiving a restricted view of system resources. Namespaces separate process identifiers, mount points, network interfaces and other resources. Control groups account for and limit resource usage. Linux capabilities, seccomp filters and mandatory access control systems can add further restrictions. The exact security boundary depends on configuration and the host environment.

Building reproducible images

A Dockerfile describes how to create an image. Common instructions select a base image, set a working directory, copy application files, install dependencies and define the default command. The build engine can cache layers when earlier inputs have not changed. Placing stable dependency installation steps before frequently changing application files can improve build performance, but careless caching can also preserve stale or unintended data.

A good image normally contains only the files needed at runtime. Multi-stage builds allow compilers and development tools to remain in a build stage while a smaller final stage receives the application artifact. Smaller images can reduce transfer time and surface area, although image size is only one part of operational security. Teams also need to scan dependencies, pin base-image versions where appropriate, update images and manage secrets outside the image itself.

Development and deployment workflows

Containers help developers reduce differences between laptops, test systems and production environments. A service can declare its dependencies and expose a predictable interface without requiring every developer to install the same language runtime and database directly on the host. Compose-style tools can describe a group of services for local testing, while orchestration systems such as Kubernetes manage larger deployments across multiple machines.

In continuous integration, a pipeline can build an image, run tests against it, attach metadata and publish it to a registry. Deployment systems then pull that specific image rather than rebuilding the application independently on each server. This creates a clearer chain between a tested artifact and the version that is running. It does not remove the need for configuration management, monitoring, backups or safe rollout strategies.

Security and operational trade-offs

The shared-kernel model makes containers generally lighter to start and operate than full virtual machines. It also means that the kernel is part of the isolation boundary. A vulnerable host kernel or an overly privileged container can weaken separation between workloads. Running as a non-root user, dropping unnecessary capabilities, restricting mounts and network access, and keeping the host patched are important defensive practices.

Containers introduce their own operational concerns. Logs may disappear when ephemeral containers are replaced unless they are sent to a central system. Persistent data needs explicit storage. Networking, DNS and service discovery must be configured. Image tags can move over time, so production systems often record immutable digests to identify exactly what was deployed.

What Docker changed

Docker popularised a workflow in which an application and its runtime dependencies could be described, built and distributed as a single image. The container format and runtime ecosystem later developed through broader industry standards, including the Open Container Initiative. Other tools can build or run compatible images, so Docker is best understood as a major platform in the container ecosystem rather than as the only implementation of containers.

Choosing containers appropriately

Containers are useful when an application benefits from a repeatable runtime environment, but they are not mandatory for every deployment. A small static website may be simpler to host directly, while a service with multiple dependencies may benefit from a container image. Teams should consider startup time, state management, operational expertise and security requirements. Containerisation standardises packaging; it does not automatically improve architecture, reliability or performance. Those qualities still come from sound software design and operational practices.

Editorial connections and engineering implications

Image layers, registries and reproducibility

A container image is assembled from filesystem layers and metadata. Shared layers reduce storage and transfer costs, while a registry stores image manifests and content for deployment. Tags such as latest are convenient but mutable; production releases are more reproducible when they refer to an immutable digest and record which image was tested. Containers use operating-system isolation such as namespaces and control groups. They normally share the host kernel, so they are lighter than full virtual machines but rely on careful privilege and kernel configuration.

A safer build process keeps only runtime files in the final image, avoids embedding credentials in layers, uses maintained base images and runs with limited privileges. Multi-stage builds separate compilers from runtime components. Docker or a compatible builder can package an application, while Kubernetes can orchestrate containers across machines. A small deployment may need only Compose; a larger platform must also plan networking, storage, monitoring and failure recovery. The tool should fit the operational problem rather than add complexity by default.

See also

  • Kubernetes – An open-source system for automating deployment, scaling and management of containerised applications.
  • Linux – A family of open-source, Unix-like operating systems based on the Linux kernel.
  • Domain Name System (DNS) – The distributed naming system that translates human-readable domain names into records used to locate internet services.
  • Git – A distributed version control system that tracks changes to files as a graph of snapshots.
  • GitHub – A web platform for hosting Git repositories and collaborating on software with pull requests, issues, automation and apps.
  • Linus Torvalds – Finnish-American software engineer who created the Linux kernel and the Git version control system.
  • Microservices – An architectural style that structures an application as independently deployable services communicating through explicit interfaces.
  • C (programming language) – A general-purpose, statically typed systems programming language created at Bell Labs in the early 1970s.

References

  1. ↑ Docker Documentation (docs.docker.com)