What problem does Docker solve? It ships the environment too
By Christophe Paka · Facts checked on 7 November 2026
Your app runs on your laptop. Your teammate installs it and the install fails. You deploy it to the server and you get a bug nobody has seen before. Same code, three machines, three results.
What problem does Docker solve? This one: the machine used to decide whether your app ran. The figure below shows the same app on the same three machines, shipped two ways. Only one thing changes between them, and it is what you put in the box.

Use this diagram on your site
Free to share in your blog post, docs, course or slides, as long as the credit link stays. Paste the code below where the figure should go.
How to read this figure
Read the left panel title. The left panel says ship the app and hope the machine cooperates. At the top sits the app with an install guide: install Python, install a library (libfoo stands for any bundle of code the app borrows), set the environment variables (named settings the app reads when it starts). That guide is the only thing that travels with the code.
Follow the arrows to three machines. Three arrows leave the guide. Your laptop runs macOS with one Python version. Your teammate's laptop runs Windows with an older one. The server runs Debian with older libraries still. The labels are examples. The point is that all three differ.
Read the three outcomes. Each machine ends in its own result: works, install fails, different bug. The code did not change. What changed is the half of the environment that nobody wrote down and every machine supplies by itself.
Switch to the right panel. Now the top box is one container image: the app plus every file it needs to run. An image is a read only package; a Compose file is different, a text file that starts containers from images. Docker uses an image to start a container: your app running as an ordinary program, fenced off from the others. It is not a small computer: it shares the machine's kernel, the core of the operating system.
Compare the outcomes. All three machines now show the same result, runs the same. The machine only has to run Docker. It no longer adds its own unwritten half of the environment, so what you tested is what the server runs.
Read the bottom bar. The bar sums it up: same app, same three machines, one change. The change is what you shipped. The image carries the environment, so the machine stops deciding the outcome.
Key takeaways
- When an app works on one machine and fails on another, suspect the unwritten environment first, not the code.
- Ship the environment inside an image, so the thing you test is the thing the server runs.
- Skip Docker for a single script that only you run on one machine; add it when a second machine or person appears.
Worked example: decide whether you need Docker
Use the book's decision table. Find the row that matches your work, then read what it suggests.
- You run one script on your own laptop. Nothing ships and nobody has to match your setup. Stay as you are.
- You deploy an app to a server. The server must run exactly what you tested. Use Docker.
- You run a self hosted app on a NAS or a mini PC. Most such apps ship as images and a Compose file. Compose is a Docker tool that starts several containers from one text file. Use Docker plus Compose.
- A team must share one environment. One file replaces the setup guide. Use Docker plus Compose.
- Many machines must not go down. Use a container orchestrator such as Kubernetes: it moves containers when a machine fails.
Result: Most readers land on one of the middle rows. If you land on the first, come back when a second machine or a second person appears.
Questions readers ask
Explain Docker to me like I'm 5: what is it?
Picture a steel shipping box. Ships, cranes and trucks stopped caring what was inside once cargo moved in one standard box. Docker is that box for software. The box is the image, the cargo is your app and its files, and any machine running Docker is the crane.
Do I need Docker for a small project?
Not always. If your work is one script on one machine, used by you alone, Docker adds a step with nothing to gain. Once a second machine or a second person appears, Docker starts to pay for itself, because one image runs the same on both.
Is a container the same as a small virtual machine?
No. A container is a running copy of an image: your app as a fenced off program on the machine, not a small computer. A virtual machine simulates a whole computer. The container versus VM figure draws the difference.
Sources: Get started: introduction (Docker docs); What is an image? (Docker docs).
This figure is from Docker Made Crystal Clear, chapter 1.
The chapter builds the idea step by step, with recipes you can follow, a Try it to check yourself, and every source.
Get the book


