📦Container Image
Also known as Docker Image, OCI Image, Image (Containers)
The saved pack that a container starts from. One image can start many of them.
Think of it like
It is like a cookie cutter. One cutter makes as many cookies as you want, all the same.
Example
Emma builds an image of her shop app and tags it 1.4. The test server and the live server both start containers from that same image.
Why it matters
The image never changes, so what you tested is exactly what goes live.
Definition
Example code
bash
docker build -t shop-app:1.4 .
docker run -d shop-app:1.4Common mistake
Key takeaways
- 1Built in layers. Each layer adds or changes some files.
- 2Never changes. A change means a new image.
- 3Tagged by version. The tag says which build it is.