Use this when running containers without root on the host.
Rootless Containers
Rootless containers run the container engine and containers as an ordinary user with user namespaces, so a container escape lands as an unprivileged user instead of root on the host.
1. Rootless containers run the engine and containers without root on the host.
2. User namespaces map container root to unprivileged host users.
3. Reduces escape impact.
4. Some features limited (ports < 1024, some storage).
5. At minimum runAsNonRoot.
unprivileged user → rootless runtime → container
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
docker info --format '{{.SecurityOptions}}' # contains rootless
podman info --format '{{.Host.Security.Rootless}}'
ps -o user,pid,cmd -C dockerd
In rootless mode, the daemon and containers run as an unprivileged user, and root inside the container maps to that user's subordinate UID range (/etc/subuid).
Step 2 Common mistakes Narrow the fault
- Assuming rootless means no risk (still check capabilities and mounts).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Rootless engines use user namespaces.
- An escape lands as an unprivileged user.
- Some features (low ports, some networking) need workarounds.
podman info | grep rootless— rootless Podmandocker context ls / dockerd-rootless-setuptool.sh check— rootless Dockerkubectl get pod <p> -o jsonpath='{..runAsNonRoot}'— non-root in Kubernetes
ReferenceWhy it matters1 section · depth on demand
How rootless mode helps
With user namespaces, UID 0 inside the container maps to an unprivileged UID on the host, so a container escape lands as an ordinary user. Podman runs rootless by default; Docker has rootless mode (dockerd-rootless-setuptool.sh install). Limitations: binding ports below 1024 needs extra configuration, some storage drivers and networking modes differ.
ReferenceHow it works1 section · depth on demand
In depth
Rootless containers run the container runtime and containers without root privileges on the host, using user namespaces to map container root to an unprivileged host user. If an attacker escapes the container, they land as an ordinary user rather than root.
| Runtime | Rootless support |
|---|---|
| Podman | Rootless by default for users |
| Docker | Rootless mode available |
| containerd/nerdctl | Rootless mode |
| Kubernetes | User namespaces for pods (hostUsers: false), beta/GA depending on version |
podman run --rm -it docker.io/library/alpine id
dockerd-rootless-setuptool.sh install
Limitations: binding ports below 1024, some storage and network drivers, and performance differences — test workloads before switching.
ReferenceImportant terms & boundaries1 section · depth on demand
Options
| Option | Notes |
|---|---|
| Podman rootless | Default for non-root users, user namespaces |
| Docker rootless mode | dockerd-rootless-setuptool.sh install |
USER in Dockerfile | Container process not root (but the daemon may be) |
Kubernetes runAsNonRoot: true | Enforced per pod |
Rootless limits: binding ports < 1024, some network modes and storage drivers.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Container Security → Rootless Containers. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/sp/800/190/final · confidence 94%