Docker
Docker packages your application and all its dependencies into a lightweight, portable container that runs the same way everywhere: your laptop, a test server, or production.
§ 1 Definition
Docker is an open platform for developing, shipping, and running applications in containers. A container packages your code, runtime, system tools, libraries, and settings into a single executable unit. Unlike virtual machines, containers share the host operating system's kernel, making them lightweight and fast to start. Docker eliminates the 'it works on my machine' problem by ensuring your application runs identically in every environment. It has become the de facto standard for containerization and is the foundation of modern CI/CD pipelines and cloud-native development.
§ 2 Containers vs Virtual Machines
VMs virtualize hardware, running a full guest operating system on top of a hypervisor. Each VM includes its own OS, which consumes gigabytes of disk space and minutes to boot. Containers virtualize the operating system. They share the host kernel and run as isolated processes. A container starts in milliseconds and uses megabytes of storage, not gigabytes. You can run dozens of containers on the same hardware that would only fit a few VMs.
§ 3 Docker Architecture
Docker uses a client-server architecture. The Docker daemon (dockerd) manages containers, images, networks, and storage volumes. The Docker client (docker CLI) communicates with the daemon via REST API. Docker images are read-only templates that define what runs in a container. Dockerfiles are the recipes for building images. Docker registries (Docker Hub, private registries) store and distribute images. Docker Compose defines multi-container applications in a YAML file.
§ 4 Why Docker Matters for DevOps
Docker provides consistent environments from development through production. Developers run the same container locally that will run in production. CI/CD pipelines build and test inside containers, ensuring environment parity. Kubernetes orchestrates Docker containers at scale. Docker also enables microservices architectures, where each service runs in its own container and communicates via APIs.
§ 5 Note
§ 6 In code
```dockerfile
# Dockerfile for a Node.js application
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
```
```bash
# Build and run the container
docker build -t my-app .
docker run -d -p 3000:3000 my-app
```§ 7 Common questions
- Q. Is Docker a virtual machine?
- A. No. Containers share the host kernel, making them much lighter and faster than VMs. A container is essentially an isolated process with its own filesystem.
- Q. Do I need Docker for my project?
- A. If you have multiple environments (dev, staging, production) or work on a team, Docker eliminates environment inconsistencies. For a solo static site, it's overkill.
- Docker packages apps with all dependencies into lightweight, portable containers.
- Containers share the host kernel, making them far more efficient than virtual machines.
- Docker ensures your application runs identically in every environment.
- It is the foundation of modern CI/CD, microservices, and cloud-native development.
We containerize applications with Docker so they deploy consistently across every environment. Contact us about your Docker setup.
Get in touchDocker packages your application and all its dependencies into a lightweight, portable container that runs the same way everywhere: your laptop, a test server, or production.
Category: Devops (also: Infrastructure)
Author: Atomic Glue Editorial Team
## Definition
Docker is an open platform for developing, shipping, and running applications in containers. A container packages your code, runtime, system tools, libraries, and settings into a single executable unit. Unlike virtual machines, containers share the host operating system's kernel, making them lightweight and fast to start. Docker eliminates the 'it works on my machine' problem by ensuring your application runs identically in every environment. It has become the de facto standard for containerization and is the foundation of modern [CI/CD](/glossary/ci-cd-github-actions) pipelines and cloud-native development.
## Containers vs Virtual Machines
VMs virtualize hardware, running a full guest operating system on top of a hypervisor. Each VM includes its own OS, which consumes gigabytes of disk space and minutes to boot. Containers virtualize the operating system. They share the host kernel and run as isolated processes. A container starts in milliseconds and uses megabytes of storage, not gigabytes. You can run dozens of containers on the same hardware that would only fit a few VMs.
## Docker Architecture
Docker uses a client-server architecture. The **Docker daemon** (dockerd) manages containers, images, networks, and storage volumes. The **Docker client** (docker CLI) communicates with the daemon via REST API. **Docker images** are read-only templates that define what runs in a container. **Dockerfiles** are the recipes for building images. **Docker registries** (Docker Hub, private registries) store and distribute images. **Docker Compose** defines multi-container applications in a YAML file.
## Why Docker Matters for DevOps
Docker provides consistent environments from development through production. Developers run the same container locally that will run in production. CI/CD pipelines build and test inside containers, ensuring environment parity. [Kubernetes](/glossary/kubernetes) orchestrates Docker containers at scale. Docker also enables microservices architectures, where each service runs in its own container and communicates via APIs.
## Note
Use multi-stage builds to keep images small. A well-optimized Docker image for a Node.js app should be under 200MB. Alpine-based images are significantly smaller than full Debian or Ubuntu.
## In code
## Common questions Q: Is Docker a virtual machine? A: No. Containers share the host kernel, making them much lighter and faster than VMs. A container is essentially an isolated process with its own filesystem. Q: Do I need Docker for my project? A: If you have multiple environments (dev, staging, production) or work on a team, Docker eliminates environment inconsistencies. For a solo static site, it's overkill.
## Key takeaways
- Docker packages apps with all dependencies into lightweight, portable containers.
- Containers share the host kernel, making them far more efficient than virtual machines.
- Docker ensures your application runs identically in every environment.
- It is the foundation of modern CI/CD, microservices, and cloud-native development.
## Related entries
- [Kubernetes](atomicglue.co/glossary/kubernetes)
- [CI/CD (GitHub Actions)](atomicglue.co/glossary/ci-cd-github-actions)
- [Deployment Pipeline](atomicglue.co/glossary/deployment-pipeline)
Last updated July 2026. Permalink: atomicglue.co/glossary/docker