Interview Prep/Docker/Containers, VMs & Isolation Internals

What is a user namespace and what is `userns-remap`?

AdvancedConceptContainers, VMs & Isolation Internals
Answer

A user namespace maps UIDs inside the container to different UIDs on the host, so container root (0) can be an unprivileged UID like 100000 outside. If it escapes, it has no host privileges. Enable daemon-wide with "userns-remap": "default" in /etc/docker/daemon.json; Docker creates the dockremap user and reads ranges from /etc/subuid. Trade-offs: bind-mount ownership gets awkward, and some options (--privileged, --pid=host) are incompatible.

All Docker questions Roadmap: Docker & containers

More on Containers, VMs & Isolation Internals