Interview Prep/Docker/Image Security & Hardening

What is user-namespace remapping's effect on volumes in production?

IntermediateProductionImage Security & Hardening
Answer

Files created by container root appear on the host owned by the remapped range (e.g., 165536). Existing volumes and bind mounts owned by real root are unreadable. We migrate by chown -R 165536:165536 on data dirs, and Docker uses a separate /var/lib/docker/165536.165536 data root, so previous images/volumes are not visible after enabling it.

All Docker questions Roadmap: Docker & containers

More on Image Security & Hardening