Container Image vs Container
People use image and container as if they meant the same thing, and they do not. An image is the saved package, and it never changes. A container is one copy of it that is running right now. One image can start many containers. Delete a container, and the image is still there to start a new one.
Container Image
The saved pack that a container starts from. One image can start many of them.
A container image is the saved package a container starts from. It holds the app, its tools and its settings, stacked in layers. Each layer adds or changes some files. An image never changes once it is built. To change it, you build a new one with a new tag. One image can start many containers at the same time.
Container
A sealed box that holds an app and all it needs. It runs the same anywhere.
A container is a sealed box for one app. It holds the app's code and every file the app needs to run. Because it brings its own files, it runs the same on a laptop and on a server. Many containers can share one machine, and each stays in its own space. They are lighter than a virtual machine, because they share the machine's core system, the kernel.
In one line
- Container Image
- The saved pack that a container starts from. One image can start many of them.
- Container
- A sealed box that holds an app and all it needs. It runs the same anywhere.