How Containers Work — a visual explainer
or use ← → arrow keys
💻
Your Laptop
Python 3.12 · NumPy 1.26 · libssl 3.0
✓ works
▼  deploy same code  ▼
🖥️
Production Server
Python 3.9 · NumPy 1.21 · libssl 1.1
✗ crash
⚠ ImportError: incompatible library version
📦
Web App
Python 3.12
Flask 3.0
libssl 3.0
📦
ML Model
Python 3.11
PyTorch 2.2
CUDA 12
📦
Database
Postgres 16
pg_vector
config files
Web App
Python 3.12
Flask 3.0
ML Model
Python 3.11
PyTorch 2.2
Database
Postgres 16
pg_vector
isolated processes, shared kernel
Container Engine (Docker)
Host Operating System — Linux Kernel
Hardware — CPU · RAM · Disk
Your Laptop
💻
✓ runs
📦
same container
Test Server
🧪
✓ runs
Production
☁️
✓ runs

1. Your Flask app runs perfectly on your laptop but crashes on the production server with an ImportError. What is the most likely cause?

2. A container packages…

3. How do containers differ from virtual machines?

4. You build and test a container on your laptop, then deploy it to a cloud server. What happens?