# User Namespaces

> What is user namespace remapping in Docker, and how does it protect the host if a container is compromised?

Canonical: https://www.internhack.in/learn/interview/docker-containers/docker-user-namespace-remapping
Last updated: 2026-11-28

Difficulty: Advanced

## Question

What is user namespace remapping in Docker, and how does it protect the host if a container is compromised?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

User Namespaces, userns-remap, subuid/subgid, Container Escape, Rootless Docker

Previous: [Image History](https://www.internhack.in/learn/interview/docker-containers/docker-history-command) · Next: [HEALTHCHECK](https://www.internhack.in/learn/interview/docker-containers/docker-healthcheck-instruction) · [All of Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)

## More Docker & Containers questions

- [Tmpfs Mounts](https://www.internhack.in/learn/interview/docker-containers/docker-tmpfs-mounts)
- [Compose Scaling](https://www.internhack.in/learn/interview/docker-containers/docker-compose-scaling)
- [Docker Context](https://www.internhack.in/learn/interview/docker-containers/docker-context-management)
- [Storage Drivers](https://www.internhack.in/learn/interview/docker-containers/docker-storage-drivers)
- [Kill vs. Stop](https://www.internhack.in/learn/interview/docker-containers/docker-kill-vs-stop)
- [Renaming Containers](https://www.internhack.in/learn/interview/docker-containers/docker-rename-container)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Docker & Containers](https://www.internhack.in/learn/interview/docker-containers)
