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.
Origin (dotCloud, 2013, Solomon Hykes) and why containers changed deployment.
Guide in progressDocker Desktop vs. Docker Engine, and platform differences.
Guide in progressThe core distinction: a blueprint vs. a running instance.
Guide in progressThe recipe for building an image, instruction by instruction.
Guide in progressdocker build, layer caching, and multi-stage builds.
Guide in progressBridge networks, exposed ports, and container-to-container communication.
Guide in progressWhy containers are ephemeral, and how volumes solve that.
Guide in progressDocker Hub and pushing/pulling images.
Guide in progressRunning as non-root, minimal base images, and scanning for vulnerabilities.
Guide in progressConsistent dev environments and the “works on my machine” fix.
Guide in progress