Skip to main content

Why is mounting docker.sock dangerous?

Senior Docker
Quick Answer The Docker daemon socket (/var/run/docker.sock) gives full control over Docker รขโ‚ฌโ€ whoever connects to it can create containers with --privileged, mount host filesystems, read secrets, or even replace running containers. Mounting the socket inside a container grants root-equivalent host access. A well-known container escape vector.

Answer

Access to docker.sock gives full daemon control ? host root access.
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