Podman Commands
Podman is a powerful daemonless container engine for developing, managing, and running OCI Containers on Linux Systems. It is a popular alternative to Docker, offering enhanced security and flexibility. This section provides essential Podman commands for everyday container management tasks.
Managing Running Containers
To view containers that are currently running, use the podman ps command. This command lists active containers, their IDs, names, and other relevant information.
# List running containers
podman ps
Viewing All Containers
To see all containers, including those that have been stopped or exited, use the podman ps -a command. This is useful for troubleshooting or restarting previously used containers.
# List all containers created
podman ps -a
Pulling Container Images
Before you can run a container, you need to pull its image from a registry. The podman pull command downloads an image to your local storage. For example, to pull the latest Vaultwarden server image:
# Pull an image
podman pull vaultwarden/server:latest
Listing Local Images
To see all the container images that are stored on your local system, use the podman images command. This helps you manage your image storage and identify which images are available to run.
# List images in local storage
podman images
Removing Containers
When a container is no longer needed, you can remove it using the podman rm command, followed by the container's name or ID. It's good practice to stop a container before removing it, though podman rm can also remove stopped containers.
# Delete a container
podman rm <container-name>
For more advanced container management and detailed command options, refer to the official Podman documentation.