Before you start, please NOTE: this guide does not cover rootless containers!
On an hypervisor with LXD installed, create a new container, ensuring that -c security.nesting=true -c security.privileged=true is set:
lxc launch -c security.nesting=true -c security.privileged=true images:fedora/35 my-containerIf the container already exists, set this parameter through lxc config:
lxc config set my-container security.nesting=true
lxc config set my-container security.privileged=trueNow enter the container
lxc exec my-container bash
and install podman. Beware that in 2022 it is possible that your hypervisor runs nftables instead of iptables,
so check if during the installation of podman you accidentally install anything related to legacy iptables.
In fedora, you can be sure to install nftables like so:
dnf install podman iptables-nftNow podman is ready to go for rootful containers!
podman run -it --rm alpine:latest sh # test containerOptionally, podman can act as docker-compatible daemon by installing podman-docker and docker-compose, then enable the service podman.service through `systemctl