Containerization
Podman
Podman is a modern, daemonless container engine that provides a Docker-compatible command-line interface, making it easy for users familiar with Docker to transition.
Installation
To install Podman, add the following line to configuration.nix:
virtualization.podman.enable = true;
Verified Usage
podman run
podman run runs a command in a new container.
# Start a container, execute a command, and then exit
podman run --name=c1 docker.io/library/alpine ls /etc
# Start a container and attach to an interactive shell
podman run -it docker.io/library/alpine
podman image
podman image manages local images.
# List downloaded images
podman image ls
podman ps
podman ps lists containers.
# Show the status of all containers (including exited ones)
podman ps -a
podman rm
podman rm removes one or more containers.
# Remove a container named foo
podman rm foo