Containers Are Just Processes
LEVEL 0
The Problem
When you run a container, it feels special. It feels like you’ve created a miniature computer inside your computer. A sealed-off environment where your application lives in isolation.
But here’s a question that might shake your mental model: Where is the container?
Is it a file on disk? Is it a virtual machine running somewhere? Is it a special Docker construct?
The answer is simpler and more profound than you might think.
A container is just a process. A regular Linux process. Running on your host operating system.
When you docker run nginx, you’re not booting up a tiny operating system. You’re starting the nginx process. That process is running directly on your Linux kernel, right alongside all your other processes.
But if it’s just a process, why does it feel isolated? Why can’t it see your other files? Why does it think it’s the only thing running?