LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

podman-run

Create and start containers from images

TLDR

Run a container
$ podman run [image]
copy
Run interactively
$ podman run -it [image] [/bin/bash]
copy
Run in background
$ podman run -d [image]
copy
Run with port mapping
$ podman run -p [8080:80] [image]
copy
Run with volume mount
$ podman run -v [/host/path:/container/path] [image]
copy
Run with name
$ podman run --name [mycontainer] [image]
copy
Run with environment variable
$ podman run -e [VAR=value] [image]
copy
Run and auto-remove on exit
$ podman run --rm -it [image] [command]
copy
Run with custom network
$ podman run --network [network_name] [image]
copy

SYNOPSIS

podman run [options] image [command]

DESCRIPTION

podman run creates and starts a new container from a specified image. It is the primary command for launching containers, supporting interactive sessions (-it), background execution (-d), port mapping (-p), volume mounts (-v), and environment variables (-e).The --rm flag automatically removes the container when it exits. The --name option assigns a human-readable name. By default, Podman runs containers rootlessly without requiring a daemon, making it a drop-in replacement for docker run.

PARAMETERS

IMAGE

Container image.
-it
Interactive terminal.
-d, --detach
Run in background.
-p, --publish PORT
Port mapping.
-v, --volume MOUNT
Volume mount.
--name NAME
Container name.
-e, --env VAR
Environment variable.
--rm
Remove container after exit.
--network MODE
Set network mode (bridge, host, none, or custom network name).
--restart POLICY
Restart policy (no, on-failure[:max], always, unless-stopped).
-w, --workdir DIR
Working directory inside the container.
--user USER
Run as specified user (name or UID[:GID]).
--cap-add CAP
Add Linux capabilities.
--cap-drop CAP
Drop Linux capabilities.
--entrypoint CMD
Override image entrypoint.
--label KEY=VALUE
Set metadata label on container.

INSTALL

sudo apt install podman
copy
sudo dnf install podman
copy
sudo pacman -S podman
copy
sudo apk add podman
copy
sudo zypper install podman
copy
brew install podman
copy
nix profile install nixpkgs#podman
copy

CAVEATS

Runs rootless by default without requiring a daemon. Most Docker CLI flags are compatible. Some features (e.g., certain network modes) may behave differently in rootless mode.

HISTORY

podman run was introduced as part of the Podman project by Red Hat, providing a daemonless, Docker-compatible container runtime.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid