BM: Baca dalam Bahasa Melayu
World D6: Under the Hood
Rootless mode and Podman
You will learn: why root in a container can be root on your laptop, and how rootless Docker and Podman shrink that risk.
Checked with Docker Engine 29 on 31 Oct 2026
The problem
By default, root inside a container is root on the laptop too. A bug lets an app break out of its box. What can it do?
Pick one answer.
Watch
Flip the User switch. Watch the uid on the laptop.
What it can see (namespaces)
User
Inside:
uid=0(root)On the laptop:
uid=0(root on the laptop too!)Docker uses this switch only in rootless mode, or with userns-remap.
Root inside now maps to uid 100000 outside. That is a user namespace: Root inside the container, an ordinary user on the laptop. Off in Docker unless you ask.. Docker leaves it off unless you ask.
Watch
rootless mode: The Docker daemon and its containers run as you, not as root. A break-out gets only your rights. goes further. The Docker daemon itself runs as you, inside a user namespace. A break-out gets only your rights.
Predict
In rootless mode, you type docker run -d -p 80:80 nginx:1.30-alpine. What happens?
Pick one answer.
Try it
Podman runs the same images with no daemon at all. Run it as yourself, and it is rootless. Sort each one.
Drag a card into a box. Or tap the card, then tap the box.
Check
Safe habit, or needs work?
Swipe right for good, left for needs work. Or use the buttons.
Run your app as a non-root USER inside the image.
You did it!
You can now explain how rootless Docker and Podman keep root out of reach.
Go deeper (optional)
Rootless needs newuidmap and newgidmap (the uidmap package) and 65,536 spare ids in /etc/subuid and /etc/subgid. Limits like --memory need cgroup v2 with systemd. Low ports need the tips page. For Podman, alias docker=podman covers most commands.
Real mission
grep ^$(whoami): /etc/subuiddockerd-rootless-setuptool.sh installdocker infodocker run --rm hello-world
0 of 5 steps done · Your ticks are saved.
Bahasa Melayu
Secara lalai, root dalam container ialah root pada laptop juga. Satu pepijat biar aplikasi terlepas dari bekasnya. Apa yang ia boleh buat?
Root di dalam kini jadi uid 100000 di luar. Itulah user namespace (namespace pengguna). Docker biarkannya mati kecuali anda minta.
Rootless mode (mod tanpa root) pergi lebih jauh. Daemon Docker sendiri berjalan sebagai anda, dalam user namespace. Kalau terlepas, ia dapat hak anda sahaja.
Dalam mod rootless, anda taip docker run -d -p 80:80 nginx:1.30-alpine. Apa jadi?
Podman jalankan image yang sama tanpa daemon langsung. Jalankannya sebagai diri anda, dan ia rootless. Susun setiap satu.
Tabiat selamat, atau perlu diperbaiki?
Kini anda boleh terangkan cara Docker rootless dan Podman jauhkan kuasa root.
You finished this before. Practice is always welcome!
Official docs: Rootless mode · Rootless mode: tips · Isolate containers with a user namespace · Podman documentation
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?