Jonatan Matajonmatum.com
conceptsnotesexperimentsessays
© 2026 Jonatan Mata. All rights reserved.v2.1.1
Concepts

Docker

Container platform that packages applications with all dependencies into portable, consistent units that run identically in any environment.

seed#docker#containers#devops#packaging#portability#images

What it is

Docker is a platform that allows packaging applications into containers — lightweight units that include the code, runtime, libraries, and configuration needed to run. A container runs identically on your laptop, in CI/CD, and in production.

Key concepts

ConceptFunctionExample
ImageImmutable template with the filesystemnode:22-alpine, custom image
ContainerRunning instance of an imagedocker run my-app
DockerfileRecipe for building an imageFROM, COPY, RUN, CMD
RegistryImage repositoryDocker Hub, ECR, GHCR
VolumePersistent storage outside the containerDatabase data, uploads

Basic Dockerfile

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]

Docker vs VMs

AspectDockerVM
OverheadMinimal (shares kernel)High (full OS)
StartupSecondsMinutes
SizeMBsGBs
IsolationProcessHardware

Best practices

  • Use official and minimal base images (alpine)
  • Multi-stage builds for small images
  • Don't run as root
  • One process per container
  • .dockerignore to exclude unnecessary files

Why it matters

Docker standardized application packaging. A container works the same in development, CI, and production. This consistency eliminated an entire category of environment bugs and enabled practices like CI/CD, microservices, and immutable infrastructure.

References

  • Docker Documentation — Official documentation.
  • Dockerfile Best Practices — Official guide.
  • Docker Overview — Docker, 2024. Official Docker documentation.

Related content

  • Dev Containers

    Specification for defining reproducible development environments in containers, eliminating 'works on my machine' problems and accelerating onboarding.

  • AWS ECS

    AWS container orchestration service that runs and scales Docker applications without managing the underlying cluster infrastructure.

  • Cloud Native

    Development approach leveraging cloud advantages: containers, microservices, immutable infrastructure, and declarative automation for scalable and resilient systems.

  • Container Registries

    Repositories for storing, versioning, and distributing container images, from public registries like Docker Hub to private registries like ECR.

  • Container Security

    Practices and tools for securing containers throughout their lifecycle: image building, runtime, orchestration, and compliance.

  • Kubernetes

    Container orchestration platform that automates deployment, scaling, and management of containerized applications at scale, becoming the de facto standard for cloud native.

  • Docker Compose

    Tool for defining and running multi-container applications with a YAML file, simplifying local development of systems with multiple services.

  • AWS Fargate

    Serverless compute engine for containers that eliminates server management, allowing Docker container execution paying only for consumed resources.

Concepts