liveBook · Manning

Podman run

As explained in Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more

podman run is a Podman command that creates and starts a new container from an image.

podman run creates and starts a new container from an image. It can pull the image from a container registry into local container storage, then execute the image's default command or a supplied command. section 2.1 section 2.1.1

Open an interactive shell

podman run -ti --rm registry.access.redhat.com/ubi8/httpd-24 bash connects the terminal to Bash inside a newly pulled container. The container stops when Bash exits, and --rm deletes it afterward. The shell can reveal a different operating-system release, filesystem contents, and process list from the host. section 2.1.1

Launch a web application

podman run -d -p 8080:8080 --name myapp registry.access.redhat.com/ubi8/httpd-24 runs the Apache-based container in detached mode, names it myapp, and maps its container port to localhost:8080. A second running container needs another name and host port. section 2.1.2

How Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more covers it

How deep it goes
Explains image pulling, command selection, terminal attachment, cleanup, naming, ports, detachment, and restart policies.
Examples
Uses UBI8 httpd-24, interactive Bash, localhost port mappings, browser access, and a second container on port 8081.
What it assumes
Assumes command-line familiarity while teaching image registries, local container storage, container commands, and host-to-container ports.
What you can do after
Apply it via Podman to pull images, run commands, expose services, name containers, and configure restart behavior.
How it connects
Connects container images, container registries, podman create, podman start, podman exec, and systemd.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more. The section links point to the parts of the book it draws on.