← thecodex.expert · The Codex Family of Knowledge
Cloud & Infrastructure

Docker

Package your app and everything it needs into a container that runs identically anywhere.

What is Docker?

Docker packages your application together with everything it needs to run — the code, the runtime, the libraries, the settings — into a single unit called a container. That container runs identically on your laptop, your colleague's machine, and the production server. It ends "but it works on my machine."

When should you use it?

Use Docker when you want your app to run the same everywhere, when your app needs specific versions of things, when you are running multiple services together, or when you are deploying to the cloud. It is close to essential for modern backend development.

How to set it up

Install Docker Desktop (Mac/Windows) or Docker Engine (Linux). You write a Dockerfile describing how to build your app's image, then docker build and docker run.

How it connects to your code

A Dockerfile defines your container. docker-compose.yml defines several containers running together (your app + its database). Most projects on The Codex include a Dockerfile you can copy.

Docker Reference Topics 10 planned

These are the topics planned for this reference. They are not written yet — the list is published so you can see what is coming. Everything already complete on this site is linked from the Languages section.

What is Docker Coming soon

Origin (dotCloud, 2013, Solomon Hykes) and why containers changed deployment.

Guide in progress
Installing Docker Coming soon

Docker Desktop vs. Docker Engine, and platform differences.

Guide in progress
Images and Containers Coming soon

The core distinction: a blueprint vs. a running instance.

Guide in progress
Dockerfile Basics Coming soon

The recipe for building an image, instruction by instruction.

Guide in progress
Building Images Coming soon

docker build, layer caching, and multi-stage builds.

Guide in progress
Docker Networking Coming soon

Bridge networks, exposed ports, and container-to-container communication.

Guide in progress
Volumes and Persistence Coming soon

Why containers are ephemeral, and how volumes solve that.

Guide in progress
Docker Registries Coming soon

Docker Hub and pushing/pulling images.

Guide in progress
Docker Security Basics Coming soon

Running as non-root, minimal base images, and scanning for vulnerabilities.

Guide in progress
Docker in Development Workflows Coming soon

Consistent dev environments and the “works on my machine” fix.

Guide in progress

More in Cloud & Infrastructure