podman/

Unable to start Podman containers in LXD

[root@fe ~]# podman run hello-world
ERRO[0000] 'overlay' is not supported over extfs at "/var/lib/containers/storage/overlay" 
Error: kernel does not support overlay fs: 'overlay' is not supported over extfs at "/var/lib/containers/storage/overlay": backing file system is unsupported for this graph driver

To fix this error, you’ll need to edit /etc/containers/storage.conf file and make sure that it contains the following options:

[storage]
driver = "overlay"
[storage.options]
mount_program = "/usr/bin/fuse-overlayfs"

Run the following command to verify the result:

podman --log-level=debug ps -a
| 5 Feb 2022

Tune kernel parameters with sysctl

Lets say there is this error when using rootless containers with podman:

Error: rootlessport cannot expose privileged port 80, you can add 'net.ipv4.ip_unprivileged_port_start=80' to /etc/sysctl.conf (currently 1024), or choose a larger port number (>= 1024): listen tcp 0.0.0.0:80: bind: permission denied

To solve this problem, the value of net.ipv4.ip_unprivileged_port_start needs to be changed

Print current value:

sudo sysctl net.ipv4.ip_unprivileged_port_start

Print all configuration:

sudo sysctl -a

Temporarily change the value:

sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80

To permanently modify the value, create a new file in /etc/sysctl.d. To apply changes, either reboot or execute sudo sysctl -p /etc/sysctl.d/99-custom.conf

| 24 Jun 2021