How to set up/manage services on a computer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.2 KiB

install and configure Podman for running rootless containers

add repo and install

Podman is being packaged natively for Debian, but hasn't yet. For now, install it from the repo being hosted by the Kubic project:

echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/podman.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | apt-key add -
apt update
apt install podman fuse-overlayfs slirp4netns

configure system

configure subuids & subgids. Add the lines:

root:1000000:1000000000
root:60000:1

to /etc/subuid and /etc/subgid.

configure podman

the default runtime runc does not support cgroup V2, so you need to change the runtime to be the alternative OCI runtime crun. Edit or create the file /etc/containers/libpod.conf and add the lines:

# Use alternative runtime with cgroup V2 support
runtime = "crun"

podman build -t systemd podman run --cgroupsns=private -ti -p 80:80 systemd --uidmap 0:10000:5000 --userns=auto

containerfile: FROM debian:10

install systemd

CMD [ "/sbin/init" ]