Why containers: from bare metal to VMs to containers
Select an icon to see what it is.
Step 5 of 6
The image carries the environment
A Docker image packages the app with its exact runtime, libraries and configuration. The same image runs on the laptop and on the server, so the server's own Python 3.8 no longer matters. The "works on my machine" problem becomes "works wherever the image runs".
One image, two hosts
laptop 192.168.1.10: docker run app -> Python 3.10 inside the containerserver 10.0.0.20: docker run app -> Python 3.10 inside the containerthe host's own Python is not used