Rootless Docker versus nonroot applications
Rootless Docker runs the daemon and containers under an unprivileged host account using a user namespace. Running an application with a nonzero UID inside a container changes its process identity, but does not by itself change the daemon identity.
Worked example
This is an offline lesson. Scenarios are fictional and Docker commands are unexecuted. Any optional execution requires an approved disposable VM, a reviewed preloaded image with verified digest, blocked external access and appropriate resource limits. No host-policy change, real credentials or live scan is required. Keep the exercise offline. Before any separately authorized runtime check, verify the effective daemon, builder, runner or deployment identity as applicable; use synthetic data, reviewed inputs and bounded resources. Record missing evidence as NOT RUN.
Illustrative comparisonRootful daemon + app UID 10001: daemon remains rootRootless daemon + app UID 0: namespace root, not host rootRootless daemon + app UID 10001: separate application identityEvidence: approved daemon mode + actual process UID + feature supportRootless operation reduces the authority of the daemon and runtime on the host. It still relies on kernel isolation and protects neither all data accessible to the host account nor the application from its own bugs. Native Linux setup depends on user namespace support, mapping helpers, subordinate ID ranges and distribution policy. Network, storage and resource-limit behavior can differ by platform and version. In an authorized lab docker info --format '{{json .SecurityOptions}}' is a narrow inspection of the selected daemon; interpret it against the actual Engine version and avoid sharing full diagnostic output. A nonroot image USER remains useful in rootless mode. Do not install or switch daemons during this lesson. Do not infer effective rootless mode from a context name or container UID. Check the actual daemon security options and host-side execution context with an authorized operator, and separately verify whether the selected resource and network features are supported.
Common mistake
UID 0 inside a namespace does not by itself tell you the host identity; rootless mode is not a security certificate.
Manual practice
Compare a rootful daemon with nonroot application to a rootless daemon with the same application. List two differences and one control both need.
Worksheet: lab-fixtures/docker-container-security/03-rootless/scenario.txt.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Rootless Docker versus nonroot applications — Knowledge check
Apply defensive container security reasoning in a fictional scenario.
What does rootless mode change?
Does a rootless daemon eliminate kernel vulnerabilities?
Why check the actual selected daemon?