Skip to main content
InterviewHubPRO
Section Overview
Q30

Question 30 of 50

Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)

60%
Docker & Containers (50 Qs)•Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)

Rootless Docker: Running the Daemon and Containers as a Non-Privileged User.

senior LevelMost AskedSecurity & AuthDocker & Containers

In Simple Words: Standard Docker requires the dockerd daemon to run as host root (root:root). Any access to /var/run/docker.sock is equivalent to root access on the host. Rootless Docker runs both dockerd and containers inside a non-root user namespace without root privileges.

  • Uses newuidmap and newgidmap to allocate UID/GID ranges.
  • Uses slirp4netns or rootlesskit for user-mode networking without requiring root iptables access.
  • Even if a complete zero-day container escape occurs, the attacker lands on the host as a standard, unprivileged user with zero ability to compromise the host kernel or access host disks.