Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › container security

How to Run Docker Containers Rootlessly With Podman

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes. You can run most Docker images with Podman as an ordinary user, without a privileged daemon and without making container root equivalent to host root. Install Podman, have an administrator configure subordinate UID and GID ranges, make sure the user-namespace helper programs are installed, add fuse-overlayfs for efficient storage, and then start the image with a normal Podman command:

podman run --rm -p 8080:80 docker.io/library/nginx:alpine

Podman uses a user namespace to translate container identities, and its rootless networking is supplied by pasta in current documentation. Docker-compatible commands and OCI images usually transfer directly, but daemon-dependent tooling, volume permissions, published ports, and network assumptions still need checking.

As an Amazon Associate I earn from qualifying purchases.

What rootless Podman changes

Rootless Podman runs containers from a regular login account rather than from the host’s root account. The process that starts the container does not gain administrator privileges. Podman’s own rootless tutorial describes this explicitly: rootless Podman “is not, and will never be, root”; it is not a setuid binary and gains no privileges merely by running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The important distinction is between container root and host root. A process that has UID 0 inside the container is mapped through a user namespace. It can appear to be root to software inside that namespace, while the host kernel associates its operations with the unprivileged account and that account’s subordinate ID ranges. A container escape or a mistaken file operation therefore does not automatically become an operation by host UID 0, although ordinary application vulnerabilities and bad mounts can still cause damage inside the permissions available to the user.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Rootless mode is consequently a security boundary and an operational model, not merely a command-line switch. Storage lives in the user’s container storage area, networking is provided by a user-space helper, and host services that expect a system-wide Docker daemon may need a different integration.

Prerequisites an administrator must arrange

The account that will run the containers needs several host facilities. Podman can be installed by the normal distribution method, but the following items are host configuration requirements rather than container image settings.

Podman from the host distribution

Install the Podman package supplied by the operating-system distribution. Confirm that the regular user can invoke the podman command before attempting to pull or run an image. Package names and service-management steps vary by distribution, so use that distribution’s supported package channel instead of copying a command intended for another host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Subordinate UID and GID ranges

An administrator must add the user to both /etc/subuid and /etc/subgid. These files provide ranges that the user-namespace machinery can map to container users and groups. Without entries in both files, rootless creation commonly fails before the container process starts.

The exact range size is a host policy decision for Podman; the cited Podman documentation requires subordinate ranges but does not publish one universal minimum. Docker’s rootless documentation, by contrast, recommends at least 65,536 subordinate UIDs and 65,536 subordinate GIDs. Do not copy that number as a Podman guarantee; verify the range your distribution and security policy assign.

User-namespace mapping helpers

newuidmap and newgidmap must be present and usable. They are provided by a sufficiently recent shadow-utils package on systems that use that package family. These helpers allow an unprivileged process to establish the UID and GID mappings described by the subordinate files. If either helper is missing, a correctly edited /etc/subuid or /etc/subgid file is not enough.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter | USB C Dongle with 90W Max Power Delivery, 3×5Gbps USB A Data Ports, for MacBook, Dell, and More (Charger Not Included)
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Rootless storage support

Install fuse-overlayfs when it is available for the host. Podman can use it for an overlay-style rootless storage implementation. If it is unavailable, Podman may fall back to the vfs driver. That fallback is functional but can consume considerably more disk space and perform worse because it does not provide the same copy-on-write behavior.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Rootless networking

Current Podman documentation uses pasta for rootless networking. On versions or distributions where pasta is not used, slirp4netns may supply the rootless network instead. The helper affects how interfaces, port publishing, and isolation behave, so treat it as part of the host’s Podman setup rather than assuming a rootful bridge network is present.

Run a Docker image as a regular user

  1. Install Podman. Use the operating system’s supported package source, then check that the command is available to the account that will own the containers.
  2. Ask an administrator to configure identity ranges. The administrator should add the account to /etc/subuid and /etc/subgid, install the newuidmap and newgidmap helpers from an adequately recent shadow-utils package, and verify that the account can use them.
  3. Install storage support. Add fuse-overlayfs so rootless storage does not have to use the less efficient vfs fallback.
  4. Start a test container without elevated privileges. Run this as the regular user, not through sudo:
podman run --rm -p 8080:80 docker.io/library/nginx:alpine
  1. Test the published port. The command maps host port 8080 to port 80 in the container. While the process is running, connect to port 8080 on the host using the client appropriate for your environment.
  2. Stop the test. Press Ctrl+C in the foreground terminal. The --rm option removes the stopped container, making this a disposable smoke test.

The image reference uses the OCI-compatible registry name docker.io/library/nginx:alpine. Podman’s CLI and image handling are designed to be familiar to Docker users, so an image built for Docker generally does not need to be rebuilt solely because Podman is starting it.

Understand the test command

Each part of the example has a separate effect:

  • podman run creates and starts a new container from an image.
  • --rm asks Podman to remove the container after it exits. It is useful for a test or one-shot job; omit it when you need to inspect or restart that container later.
  • -p 8080:80 publishes host port 8080 to container port 80 through the rootless networking stack. A port that is already occupied, or a host policy that blocks the bind, will prevent the expected access.
  • docker.io/library/nginx:alpine identifies the registry, namespace, image, and tag. Podman pulls the image if it is not already present in the user’s local storage.

Run the command as the intended account every time. Using sudo podman switches to a different storage area and identity context, producing rootful containers that do not share the rootless user’s images, volumes, or mappings.

How identity mapping affects files

Unexpected ownership on a bind mount or named volume is a normal consequence of user namespaces, not evidence that Podman has silently become root. The container sees its own UID and GID space. The host sees the translated IDs permitted by the user’s subordinate mappings and the account that launched Podman.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For that reason, a process running as UID 0 inside a container can create a file that appears on the host with an unfamiliar numeric owner. The owner is the mapped host-side identity, not host UID 0. A host user may also be unable to edit a file created by a container if the translated ownership and mode bits do not grant that user access.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Diagnose before changing permissions

  • Identify which account started the container. Rootless storage and volume access belong to that account.
  • Check whether the path is a bind mount from the host or data stored in Podman-managed storage. The two cases have different cleanup and backup implications.
  • Inspect the host-side owner and group of the affected files, then compare them with the UID and GID used by the application inside the container.
  • Confirm that the host path is writable by the mapped identity before changing container settings.

Choose a deliberate ownership strategy

For a shared host directory, create the directory with permissions and group ownership that match the account or group intended to maintain it, and have the container application run with a compatible identity where the image supports that configuration. For private application data, keep the directory under the rootless user’s control and avoid exposing it to unrelated host accounts.

Do not “fix” every unfamiliar owner by recursively changing the host tree to UID 0. That can make the files harder for the rootless account to use and defeats the isolation model. If an application requires a particular numeric UID, document that requirement and align the directory permissions with the user-namespace mapping rather than assuming container UID numbers are host UID numbers.

Rootless networking and published ports

Rootless containers cannot create the same privileged host networking setup as a rootful container. Podman therefore delegates networking to pasta in current documentation, with slirp4netns used on applicable versions. The helper creates connectivity while preserving the fact that the container is owned by an unprivileged account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The -p 8080:80 example is intentionally a high, ordinary host port. Published-port behavior depends on the helper and the host policy. If a service is reachable inside the container but not from the host, check the published-port argument, whether another process already uses that host port, and whether the rootless networking helper is installed and selected by the Podman version.

Host networking is a different trade-off. It can change how the process sees interfaces and ports and reduces the isolation provided by a separate network namespace. Use it only when the application genuinely requires host-network behavior and the resulting exposure is acceptable; do not treat it as a generic fix for a failed port publication.

Using Docker images, commands, and tooling

Podman uses the OCI image format and a Docker-familiar command style. Typical image pulls, runs, tags, and container lifecycle operations therefore transfer with little or no change. A Dockerfile image does not become incompatible merely because a different engine starts it.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray | Data transfer & Fast charging for MacBook, iPhone 17/16/15, iPad, Samsung Galaxy, Apple Watch
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Compatibility stops where Docker-specific architecture begins. Docker traditionally presents a daemon and a socket that client tools contact. Rootless Docker runs that daemon and its containers as a non-root user. Podman is daemonless: the user invokes the engine directly, and there is no assumption that a system-wide Docker daemon owns the containers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before using Docker Compose, a CI action, an IDE integration, or an automation script, inspect what it actually calls:

  • If it invokes the Podman CLI and speaks OCI-compatible image operations, it may work with minor command changes.
  • If it connects to a Docker socket, expects a daemon to maintain global state, or relies on Docker-only API behavior, configure a Podman-compatible endpoint only when the project explicitly supports it.
  • If it assumes root-owned storage, bridge-network names, or Docker’s volume-permission behavior, test those assumptions under the regular user account.

There is no universal “Docker-compatible” switch that makes daemon, storage, networking, and volume semantics identical. Check the support statement for each project and keep rootless and rootful environments separate when troubleshooting.

Rootless Podman versus rootless Docker

Both approaches let a non-root account run containers, but they do so with different engine models and host integration. The following comparison uses only characteristics established in the cited documentation.

Area Rootless Podman Rootless Docker
Engine model Daemonless; the user invokes Podman directly. Runs the Docker daemon and containers as a non-root user.
User-namespace prerequisites Requires entries in /etc/subuid and /etc/subgid, plus newuidmap and newgidmap. Docker documents a recommendation of at least 65,536 subordinate UIDs and 65,536 subordinate GIDs.
Rootless storage fuse-overlayfs is recommended for better performance; vfs may be used as a less efficient fallback. The cited Docker material does not establish a corresponding storage-driver value for this comparison.
Image and command baseline Docker-familiar CLI and OCI image handling. Docker CLI and Docker image workflow.

The practical choice is usually driven by the surrounding tooling. Podman’s daemonless design can simplify per-user operation, while software hard-coded to a Docker daemon or socket may require adaptation. In either engine, rootless mode still depends on subordinate identity ranges and has distinct volume and networking behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot the common failures

“Cannot find newuidmap” or a mapping error

Ask the administrator to install the appropriate shadow-utils package version and verify that both newuidmap and newgidmap are available. Then confirm that the account has entries in both subordinate-ID files. Editing only one file leaves group mapping incomplete.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

The container starts but storage is unexpectedly large or slow

Check whether fuse-overlayfs is installed and whether Podman has fallen back to vfs. The fallback can consume more disk space and perform worse. Installing the FUSE overlay helper and recreating storage as appropriate for the distribution can restore the intended rootless driver.

The service is listening in the container but the host cannot reach it

Review the published-port syntax, confirm that the host port is free, and verify the pasta or applicable slirp4netns setup. A service bound only to an unexpected address inside the container can also be unreachable through a publication even when the container itself is healthy.

Files on a volume have surprising owners

Interpret the owners through the user namespace. Determine which account launched the container, inspect the host-side numeric owner, and align directory permissions or the application’s runtime UID intentionally. Avoid a blanket recursive ownership change to host root.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Compose file or automation script fails immediately

Look for a Docker socket path, daemon-only API call, or assumption that all users share one engine state. Consult that project’s Podman support documentation and adapt the endpoint or command only where support is documented. If the project cannot operate without Docker-daemon behavior, rootless Podman may not be a drop-in replacement for that workload.

Operational practices for a reliable rootless setup

  • Run containers from the account that owns their images and volumes; do not alternate between the regular user and sudo.
  • Keep subordinate UID and GID assignments under administrator control and record which account owns each range.
  • Install and monitor fuse-overlayfs so a host change does not silently move storage to the larger vfs fallback.
  • Document published host ports and the rootless networking helper used by the host’s Podman version.
  • Design bind-mounted directories around mapped ownership before launching a stateful service.
  • Test every daemon- or socket-dependent integration separately; successful execution of podman run does not prove Compose, CI, or IDE compatibility.
  • Use disposable containers with --rm for smoke tests and omit it for workloads whose stopped state must be inspected or restarted.

Further reference

For a book-length treatment, Daniel Walsh’s Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more is a physical technical reference that covers Podman deployment and rootless container creation, running, and management without administrator rights.

Bottom line

Rootless Podman is the direct way to run Docker images without giving the container host-root privileges: prepare subordinate UID/GID mappings and the mapping helpers, install efficient rootless storage support, run the image as the regular user, and account for pasta-based networking and translated volume ownership. Docker-like commands and OCI images are the compatibility baseline, not a promise that daemon sockets, Compose integrations, ports, or file permissions behave identically.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

container securityDocker compatibilityLinux containersPodmanrootless containers

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.