Skip to main content

What mechanisms map container UID/GID to host UID/GID?

Senior Docker
Quick Answer By default, container UIDs map 1:1 to host UIDs รขโ‚ฌโ€ root in the container is root on the host. User namespace remapping changes this: container UID 0 maps to an unprivileged host UID (e.g., 100000). Even if the container is compromised and someone "escapes," they're an unprivileged user on the host.

Answer

User namespaces remap container root to unprivileged host users, improving isolation.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice