Rootless Podman on an Alpine host (with docker-compose support)

go back

Note: I am no longer using Podman because it just became annoying regarding networking and such. Due to that, this guide most likely won't be updated. It might still be helpful, so that's why I am keeping it up still.

Installing podman itself is easy. apk add podman and you're done. The setup however needs some work.

Load the following modules: fuse tun ip_tables. You can use /etc/modules to load them on startup (assuming that's what that's for)

Then, edit /etc/containers/storage.conf and uncomment the following line:

mount_program = "/usr/bin/fuse-overlayfs"

Don't forget to configure subuid and subgid as seen on Podman's rootless tutorial

Edit /etc/conf.d/podman and set podman_user to your user (aka anything but root)

Now you can start the podman service, add it to boot, yada yada. This is needed for docker-compose support.

For docker-compose to work. You need to point it to your Podman's sock file. You can do that by throwing the following line into your .profile assuming your uid is 1000

alias docker-compose="docker-compose -H unix:///tmp/podman-run-1000/podman/podman.sock"

And all this should work just fine. If not, I probably missed something while writing this, because it works just fine on my machine.

Oh and also, if you want to host web stuff, you need the following sysctl thingy
net.ipv4.ip_unprivileged_port_start=80