BM: Baca dalam Bahasa Melayu
World D1: First Containers
Tags and the latest trap
You will learn: what a tag is, and why latest can surprise you.
Checked with Docker Engine 29 on 31 Oct 2026
The problem
Aina ran docker run nginx in January. Ben ran the same line today. They got different versions of nginx! How?
Pick one answer.
Watch
Your laptop~
- No open hatches
Lunchboxes (containers)
- No containers yet
Frozen packs (images)
- alpine:3.221 layers · 12.9MB
- nginx:1.30-alpine8 layers · 93.5MB
0 containers (0 running), 2 images, 0 lockers.
A tag: The label after the colon, like nginx:1.30-alpine. No tag means :latest. is the label after the colon, like 1.30-alpine. No tag? Docker says Using default tag: latest.
Try it
Which labels could suddenly give you a new version?
Drag a card into a box. Or tap the card, then tap the box.
Predict
Is latest: Just the default tag name. Its makers can move it to a new version any day. always the newest, safest version?
Pick one answer.
Check
Your laptop~
- No open hatches
Lunchboxes (containers)
- No containers yet
Frozen packs (images)
- alpine:3.221 layers · 12.9MB
- nginx:1.30-alpine8 layers · 93.5MB
0 containers (0 running), 2 images, 0 lockers.
Two boxes, both “nginx”. One answers 1.30.6, the other 1.31.8. You tested one, but production got the other. That is the latest trap.
Try it
Your turn. Run web from a pinned tag: nginx 1.30 on Alpine. No surprise jumps.
Your laptop~
- No open hatches
Lunchboxes (containers)
- No containers yet
Frozen packs (images)
- alpine:3.221 layers · 12.9MB
- nginx:1.30-alpine8 layers · 93.5MB
0 containers (0 running), 2 images, 0 lockers.
Check
Your laptop~
- No open hatches
Lunchboxes (containers)
- No containers yet
Frozen packs (images)
- alpine:3.221 layers · 12.9MB
- nginx:1.30-alpine8 layers · 93.5MB
0 containers (0 running), 2 images, 0 lockers.
A tag that doesn’t exist? The real error ends with nginx:9.9: not found. Plain words: the freezer has no pack with that label.
You did it!
You can now pick tags on purpose and dodge the latest trap.
Go deeper (optional)
Even 1.30-alpine gets small fixes, so the pack can still change a little. To freeze one exact pack, use its digest: nginx@sha256:…. World D5 covers digests. One rule for now: never latest in production.
Real rep (optional):
Real mission
docker pull nginx:1.30-alpinedocker images nginx
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Aina jalankan docker run nginx pada bulan Januari. Ben jalankan baris yang sama hari ini. Mereka dapat versi nginx yang berbeza! Macam mana?
Tag ialah label selepas titik bertindih, contohnya 1.30-alpine. Tiada tag? Docker kata Using default tag: latest.
Label mana yang boleh tiba-tiba beri anda versi baru?
Adakah latest sentiasa versi paling baru dan paling selamat?
Dua bekas, kedua-duanya “nginx”. Satu jawab 1.30.6, satu lagi 1.31.8. Anda uji yang satu, tapi produksi dapat yang lain. Itulah perangkap latest.
Giliran anda. Jalankan web daripada tag yang tetap: nginx 1.30 atas Alpine. Tiada lompatan mengejut.
Tag yang tak wujud? Ralat sebenar berakhir dengan nginx:9.9: not found. Maksudnya: peti sejuk tiada pek dengan label itu.
Kini anda boleh pilih tag dengan sengaja dan elak perangkap latest.
You finished this before. Practice is always welcome!
Official docs: docker image pull · docker image tag · What is an image?
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?