BM: Baca dalam Bahasa Melayu
World D0: Start Here
YAML part 1: keys and lists
You will learn: how to write YAML keys, values and lists that a computer reads exactly as you mean.
Checked with Docker Engine 29 on 31 Oct 2026
The problem
Compose files, CI pipelines and Kubernetes all use YAML. A computer reads your note word by word. Which note can it read?
Pick one answer.
Watch
YAML: A neat recipe card for computers, made of keys, colons, dashes and spaces. is a neat recipe card for computers. Each line is a key, a colon, a space, then the value. The box shows how a computer reads it.
Change the dish to laksa. Watch the box below.
How a computer reads it
- dishnasi lemaktext
- price5number
- spicytruetrue/false
Watch
A list is lines that start with a dash and a space. Key or list item? Sort each line.
Drag a card into a box. Or tap the card, then tap the box.
Try it
The list sits under its key, two spaces in. Add one more side dish.
Add cucumber as a third side.
How a computer reads it
- dishnasi lemaktext
- sideslist ยท 2 items
- item 1sambaltext
- item 2eggtext
Predict
price: 5 and price: "5". Does a computer read them the same?
Pick one answer.
Check
Will a computer read each line the way you mean? Swipe right if yes.
Swipe right for good, left for needs work. Or use the buttons.
dish: laksaYou did it!
You can now write YAML keys, values and lists.
Go deeper (optional)
A line that starts with # is a comment: computers skip it. A short list can sit on one line: sides: [sambal, egg]. YAML files end in .yaml or .yml.
Real rep (optional): open any compose.yaml or workflow file on GitHub. Find one key and one list.
Bahasa Melayu
Fail Compose, pipeline CI dan Kubernetes semuanya guna YAML. Komputer baca nota anda perkataan demi perkataan. Nota mana yang ia boleh baca?
YAML ialah kad resepi yang kemas untuk komputer. Setiap baris ialah kunci, titik bertindih, satu ruang, kemudian nilai. Kotak di bawah tunjuk cara komputer membacanya.
Senarai (list) ialah baris yang mula dengan sengkang dan satu ruang. Kunci atau item senarai? Susun setiap baris.
Senarai duduk di bawah kuncinya, dua ruang ke dalam. Tambah satu lagi lauk.
price: 5 dan price: "5". Komputer baca kedua-duanya sama?
Komputer akan baca setiap baris ikut maksud anda? Leret ke kanan kalau ya.
Kini anda boleh tulis kunci, nilai dan senarai YAML.
You finished this before. Practice is always welcome!
Official docs: YAML 1.2 spec ยท Compose file reference (it is YAML)
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?