How does Docker work?
Docker packages an app with its dependencies and runs it in a lightweight, isolated process instead of spinning up a whole virtual machine.
Explore the flowRunning container
isolated process
VM
Docker container
Step by step
From command to container
$ docker run -p 8080:80 nginx
You run a command
The Docker CLI sends your request to the Docker Engine. This is just the start of the story, not the app itself.
The pieces
What makes Docker tick?
Click the parts of the system to learn what each one is responsible for.
The running process
Container
A container is a sandboxed process created from an image, with a small writable layer on top.
Mental model
One tiny command
docker run -p 8080:80 nginxQuick check
What does a container share with the host?
Takeaway: Docker bundles an app and its dependencies into an image, then launches it as a lightweight, isolated process that shares the host kernel.