Get Started with Podman
First Things First: Installing Podman
For installing or building Podman, please see the installation instructions:
Getting Help
Help & manpages
Manpages
For complete command details and options, review the Podman manpages.
Built-in Help
To explore all commands or inspect options for a specific subcommand directly in your terminal:
Searching, pulling, and listing images
$ podman search httpd
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/library/httpd The Apache HTTP Server Project 3762 [OK]
docker.io docker.io/centos/httpd-24-centos7 Platform for running Apache h... 40
quay.io quay.io/centos7/httpd-24-centos-7 Platform for running Apache h... 0 [OK]
docker.io docker.io/centos/httpd 34 [OK]
redhat.com registry.access.redhat.com/ubi8/httpd 0
quay.io quay.io/redhattraining/httpd-parent 0 [OK]
$ podman search httpd --filter=is-official
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/library/httpd The Apache HTTP Server Project 3762 [OK]
$ podman pull docker.io/library/httpd
Trying to pull docker.io/library/httpd:latest...
Getting image source signatures
Copying blob ab86dc02235d done
Copying blob ba1caf8ba86c done
Copying blob eff15d958d66 done
Copying blob 635a49ba2501 done
Copying blob 600feb748d3c done
Copying config d294bb32c2 done
Writing manifest to image destination
Storing signatures
d294bb32c2073ecb5fb27e7802a1e5bec334af69cac361c27e6cb8546fdd14e7
$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/library/httpd latest d294bb32c207 12 hours ago 148 MB
Running a container & listing running containers
This sample container will run a basic httpd server that serves its default index page.
Running a container
Run an Apache HTTP server in detached mode on port 8080:
Because the container is being run in detached mode, represented by the -d in the podman run command, Podman will run the container in the background and print the container ID after it has executed the command. The -t also adds a pseudo-tty to run arbitrary commands in an interactive shell.
Also, we use port forwarding to be able to access the HTTP server. For successful running at least slirp4netns v0.3.0 is needed.
Listing running containers
The podman ps command is used to list created and running containers:
If you add -a to the podman ps command, Podman will show all containers (created, exited, running, etc.).
Testing the httpd container
The container is reachable via its mapped port on your local machine:
From another machine, reach it using the host's IP address:
Instead of using curl, you can also point a browser to http://localhost:8080.