BM: Baca dalam Bahasa Melayu
World D5: Ship & Shield
No latest in production
You will learn: to tag images so you always know what is running.
Checked with Docker Engine 29 on 31 Oct 2026
The problem
Production ran kedai-api:latest all week. Nobody touched production. So why did it break on Friday? Tap each day.
Tap each point on the timeline.
Watch
Your laptop~/kedai-api
- No open hatches
Lunchboxes (containers)
- No containers yet
Frozen packs (images)
- kedai-api:latest6 layers · 244MB
- node:24-alpine4 layers · 244MB
0 containers (0 running), 2 images, 0 lockers.
latest is just a label name. It does not mean newest or tested. A tag: The label after the colon, like nginx:1.30-alpine. No tag means :latest. moves to whatever you built last.
Try it
Good tag for production? Swipe right for yes.
Swipe right for good, left for needs work. Or use the buttons.
kedai-api:1.4.2Try it
Give one build two good tags: the version and the Git commit. One docker build takes two -t flags.
Your laptop~/kedai-api
- No open hatches
Lunchboxes (containers)
- No containers yet
Frozen packs (images)
- kedai-api:latest6 layers · 244MB
- node:24-alpine4 layers · 244MB
0 containers (0 running), 2 images, 0 lockers.
Hint
docker build -t kedai-api:1.4.2 -t kedai-api:sha-3f9c2e1 . The dot means “this folder”.Predict
kedai-api:1.4.2 is in production. You fix a typo. Which tag does the fix get?
Pick one answer.
You did it!
You can now tag images so production always knows what it runs.
Go deeper (optional)
Many teams also push moving tags like 1.4 and 1, for people who want updates. Production should still name the full version, or a digest (next lesson). In CI, docker/metadata-action makes these tags from your Git tags (Part 2, World C2).
Real rep (optional), in a folder with a Dockerfile and at least one Git commit:
Real mission
docker build -t practice:1.0.0 -t practice:sha-$(git rev-parse --short HEAD) .docker images practice
0 of 2 steps done · Your ticks are saved.
Bahasa Melayu
Production jalankan kedai-api:latest sepanjang minggu. Tiada siapa usik production. Jadi kenapa ia rosak hari Jumaat? Tekan setiap hari.
latest cuma nama label. Ia bukan bermaksud terbaru atau sudah diuji. Tag pindah ke apa sahaja yang anda bina paling akhir.
Tag yang bagus untuk production? Leret ke kanan untuk ya.
Beri satu binaan dua tag yang bagus: versi dan commit Git. Satu docker build boleh ambil dua -t.
docker build -t kedai-api:1.4.2 -t kedai-api:sha-3f9c2e1 . Titik itu bermaksud “folder ini”.kedai-api:1.4.2 ada dalam production. Anda baiki satu salah ejaan. Tag apa untuk pembaikan itu?
Kini anda boleh tag image supaya production sentiasa tahu apa yang ia jalankan.
You finished this before. Practice is always welcome!
Official docs: docker image tag · Docker build best practices
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?