BM: Baca dalam Bahasa Melayu
World D6: Under the Hood
A container is just a process
You will learn: that a running container is a normal Linux process, and how to see it from both sides.
Checked with Docker Engine 29 on 31 Oct 2026
The problem
You run ps aux on your Linux laptop. One line says nginx: master process. But you never installed nginx! Where did it come from?
Pick one answer.
Watch
Your laptop~
- Laptop port 8080 → web port 80
Lunchboxes (containers)
- webrunning
Frozen packs (images)
- nginx:1.30-alpine8 layers · 93.5MB · in use
1 containers (1 running), 1 images, 0 lockers.
docker top web asks Docker what runs in the lunchbox. ps aux asks the laptop. The PIDs match! The lunchbox is a normal process wearing blinkers.
Try it
Now look from inside the lunchbox. Type docker exec web ps.
Your laptop~
- Laptop port 8080 → web port 80
Lunchboxes (containers)
- webrunning
Frozen packs (images)
- nginx:1.30-alpine8 layers · 93.5MB · in use
1 containers (1 running), 1 images, 0 lockers.
Hint
docker exec web ps runs the ps program inside web.Predict
Inside, nginx is PID 1. On the laptop, it has a big PID. How many nginx masters are running?
Pick one answer.
Watch
Your laptop~
- Laptop port 8080 → web port 80
Lunchboxes (containers)
- webrunning
Frozen packs (images)
- nginx:1.30-alpine8 layers · 93.5MB · in use
1 containers (1 running), 1 images, 0 lockers.
Both print the same kernel: The kitchen's one stove: the core of Linux. Every container on a machine cooks on the same kernel. version. The kernel is the kitchen’s one stove. Every lunchbox cooks on the laptop’s stove.
Check
Which ones are true for a container? Which ones fit a virtual machine?
Drag a card into a box. Or tap the card, then tap the box.
You did it!
You can now show that a container is a process on your laptop.
Go deeper (optional)
On a Mac or Windows PC with Docker Desktop, ps won’t show nginx. It runs inside a small Linux VM (lesson 7).
Real rep (optional, Linux): see one process from both sides.
Real mission
docker run -d --name web nginx:1.30-alpinedocker top webps -ef | grep nginxdocker rm -f web
0 of 4 steps done · Your ticks are saved.
Bahasa Melayu
Anda jalankan ps aux pada laptop Linux anda. Satu baris tulis nginx: master process. Tapi anda tak pernah pasang nginx! Dari mana ia datang?
docker top web tanya Docker apa yang berjalan dalam bekas. ps aux tanya laptop. PID-nya sama! Bekas itu sebenarnya process (proses) biasa yang pakai penutup mata.
Sekarang tengok dari dalam bekas. Taip docker exec web ps.
docker exec web ps jalankan program ps di dalam web.Di dalam, nginx ialah PID 1. Pada laptop, PID-nya nombor besar. Berapa banyak nginx master yang berjalan?
Kedua-duanya cetak versi kernel yang sama. Kernel ialah satu-satunya dapur gas di dapur. Setiap bekas masak guna dapur gas laptop.
Mana yang betul untuk container? Mana yang sesuai untuk mesin maya?
Kini anda boleh tunjuk bahawa container ialah satu proses dalam laptop anda.
You finished this before. Practice is always welcome!
Official docs: docker container top · What is a container? · docker inspect
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?