advancedTop 100 Interview Questions

What is the security risk of mounting the Docker socket (`/var/run/docker.sock`) into a container?

It effectively grants that container root-equivalent control over the entire host's Docker daemon — it can create, inspect, or remove any container, including privileged ones, making socket-mounting a significant privilege escalation risk if the container is compromised or runs untrusted code.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to How would you detect if a base image has known critical CVEs before deploying?← Back to all Docker questions