EN: Read in English
Dunia D4: Set Hidangan
Compose v2 lawan v5
Anda akan belajar: bezakan nasihat Compose lama dengan nasihat semasa.
Teks BM belum disemak oleh penutur asli.
Disemak dengan Docker Engine 29 pada 31 Okt 2026
Masalahnya
Laptop anda~/kedai-kancil
- Tiada tingkap terbuka
Bekas (container)
- Belum ada container
Pek beku (image)
- kedai-kancil-api:latest6 layer · 244MB
- kedai-kancil-web:latest9 layer · 92.6MB
- nginx:1.30-alpine8 layer · 93.5MB
- node:24-alpine4 layer · 244MB
- postgres:18-alpine9 layer · 433MB
- redis:8-alpine7 layer · 162MB
0 container (0 berjalan), 6 image, 0 loker.
Satu blog dari 2019 kata: jalankan docker-compose up. Laptop anda kata: command not found. Docker anda rosak ke?
Tengok
Ketik setiap titik pada garis masa.
Set hidangan sama, kulit menu baru. Docker anda tak rosak: sengkang itu nama lama. Ketik untuk ikut ceritanya.
Teka
Kenapa nombornya lompat terus dari v2 ke v5?
Pilih satu jawapan.
Cuba
Semak Compose mana yang ada di dapur anda.
Laptop anda~/kedai-kancil
- Tiada tingkap terbuka
Bekas (container)
- Belum ada container
Pek beku (image)
- kedai-kancil-api:latest6 layer · 244MB
- kedai-kancil-web:latest9 layer · 92.6MB
- nginx:1.30-alpine8 layer · 93.5MB
- node:24-alpine4 layer · 244MB
- postgres:18-alpine9 layer · 433MB
- redis:8-alpine7 layer · 162MB
0 container (0 berjalan), 6 image, 0 loker.
Petunjuk
docker compose versionSemak
Adakah anda akan guna ini hari ini? Kanan untuk ya, kiri untuk tidak.
Leret ke kanan untuk bagus, ke kiri untuk perlu baiki. Atau guna butang.
docker compose up -dAnda berjaya!
Kini anda boleh bezakan nasihat Compose lama dengan nasihat semasa.
Nak tahu lebih (pilihan)
Go SDK benarkan program Go muat, semak dan jalankan projek Compose. Tak perlu baris arahan. Ia untuk pembina alat, bukan kerja harian. Fail anda ikut Compose Specification, yang tiada nombor versi. Latihan sebenar (pilihan): jalankan docker compose version di mesin anda.
English
A blog post from 2019 says: run docker-compose up. Your laptop says: command not found. Is your Docker broken?
Same set meal, new menu cover. Your Docker is fine: the dash is the old name. Tap through the story.
Why did the number jump from v2 straight to v5?
Check which Compose your kitchen has.
docker compose versionWould you use this today? Right for yes, left for no.
You can now tell old Compose advice from current advice.
Anda dah siapkan ini. Latihan lagi pun bagus!
Dokumentasi rasmi: History and development of Docker Compose · Compose file reference: version and name · docker compose version
Anda dah belajar 25 minit. Rehat sekejap bantu otak anda.
Pecutan selesai! Fokus yang hebat. Regangkan badan seminit?