Operations with running containers
In Chapter 2, Comparing Podman and Docker , we learned in the Running your first container section how to run a container with basic examples, involving the execution of a Bash process inside a Fedora container and an httpd
server that was also helpful for learning how to expose containers externally.
We will now explore a set of commands used to monitor and check our running containers and gain insights into their behavior.
Viewing and handling container status
Let's start by running a simple container and exposing it on port 8080
to make it accessible externally, as follows:
$ podman run -d -p 8080:80 docker.io/library/nginx
The preceding example is run in rootless mode, but the same can be applied as a root user by prepending the sudo
command. In this case, it was simply not necessary to have a container executed in that way.
Important Note
Rootless containers give an extra security advantage. If a malicious process breaks...