Podman: maybe the best container manager
Podman is a Docker-compatible command-line container manager with great features and easy to install and use.
Table of Contents
- Useful features
- Podman Compose
You can install
podman with a package manager (
- You don’t need to add the user to any group to be able to use Podman without
sudo(rootless mode). But you maybe need root permissions for some tasks.
- Every user has its own containers (and images).
Podman has the same commands as Docker:
stop/start, etc. You can even create an alias if you want to type
docker instead of
podman run -it docker.io/library/archlinux
Because podman is compatible with several registries, you need to use full paths when referring to an image:
- Official images have this path:
- Images from other publishers have this path:
# Run podman run -d -p 8080:6901 docker.io/accetto/ubuntu-vnc-xfce-firefox-g3 # instead of podman run -d -p 8080:6901 accetto/ubuntu-vnc-xfce-firefox-g3
You can type
debian (instead of
docker.io/library/debian) because there is an alias to the full path on
/etc/containers/). Edit this file to add more aliases.
Stop/start created containers
Like shutdown/start a computer:
podman stop <container name/ID>
podman start <container name/ID>
Like hibernating a computer, pauses processes:
podman pause <container name/ID>
podman unpause <container name/ID>
podman ps #show running containers podman ps -a #show stopped and running containers
podman rm <container ID/name>
Copy files to container
podman cp <file> <container ID/name>:<path>
Export/import a container
# Container example name: mycontainer # New image example name: mynewimage podman export -o mycontainer.tar mycontainer podman import --change ENTRYPOINT=/bin/bash mycontainer.tar mynewimage # You may need to change entrypoint if your container has another shell podman run -it docker.io/library/mynewimage
Save an image locally
podman save --format <format> -o <file> <image>
- Available formats:
docker-archive(tar archive compatible with
oci-archive(tar archive using the OCI Image Format),
oci-dir(a directory using the OCI Image Format),
podman inspect <element>: information about a container, image, network, etc.
Check https://docs.podman.io/en/latest/Commands.html for more info about available commands.
There is a package in Arch Linux official repositories called
podman-compose that can run Docker Compose environments with podman. After installed, just replace
podman-compose up). In addition to that, since v3.0, Podman supports Docker Compose, which can run against Podman REST API (only when running as root).
Binary not foundwarning.
WARN binary not found, container dns will not be enabled
newuidmap: subuid overflow detected
root:100000:65536 <your username>:100000:65536
podman search <search term>does not return any results. Edit
/etc/containers/registries.conf, uncomment and edit this line (by replacing
unqualified-search-registries = ["docker.io"]
If you have any suggestion, feel free to contact me via social media or email.