Lesson 1 / 26
What Is a Container?
A lightweight, isolated bundle of an app and everything it needs to run.
The problem: "it works on my machine"
An app that runs fine on your laptop can fail on a server because of different OS versions, missing libraries, or config drift. Docker packages the app with its exact environment so it behaves the same everywhere.
Shipping container analogy
Just like a physical shipping container holds any cargo and loads onto any ship or truck the same way, a Docker container holds your app and runs the same way on any machine with Docker installed.
Containers vs virtual machines
A VM virtualizes an entire machine, including its own OS kernel — heavy and slow to boot. A container shares the host's kernel and only isolates the process, so it's lighter, faster to start, and uses fewer resources.