Skip to main content

What is the effect of using docker run --privileged?

Mid Docker
Quick Answer --privileged gives the container nearly all Linux capabilities รขโ‚ฌโ€ it can mount filesystems, load kernel modules, and interact with hardware. Essentially the container becomes root on the host. Extremely dangerous in production รขโ‚ฌโ€ only ever needed for containers that legitimately need kernel-level access (like docker-in-docker setups).

Answer

This grants full host permissions and device access, defeating container security.
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