Skip to main content

Podman

Basics

List local images

podman images

Start a container based on an image ID. Get the ID from docker images.

podman run -it run --name apache bitnami/apache

control-c will stop the container for all of the run commands.

Start an image based on a tag

podman run -it run --name apache bitnami/apache:2.4.52

Start the an app with port forwarding

podman run -it -p 8080:8080 quay.io/practicalopenshift/hello-world

Get running images

podman ps

Get all images

podman ps -a

Check container logs

podman logs <Container Name> 
podman logs -f <Container Name> # Follow the logs
podman logs --tail=25 <Container Name> # Last n lines

Stop a running image. The container ID will be in the podman ps output.

podman kill <Container ID>

Remove an image. The container ID will be in the podman ps output.

podman rm <Container ID>

Remove all images.

podman rmi --all