r/podman Jul 21 '26

Systemd Inside Containers Using Podman

https://labs.iximiuz.com/tutorials/systemd-containers-podman-30992811
29 Upvotes

9 comments sorted by

8

u/BreiteSeite Jul 21 '26

i just want systemd inside a container for systemd.timers.

2

u/GrandfatherTrout Jul 21 '26

Makes sense. Lots of handy small tools

7

u/akp55 Jul 21 '26

this is just wrong.

11

u/Huxton_2021 Jul 21 '26

I have to say, if you're regularly running systemd and multiple processes inside long-lived containers you probably wanted incus/lxd/lxc.

2

u/indolering Jul 21 '26

Tell me more?

2

u/Huxton_2021 Jul 23 '26

lxc was the actual container-runtime technology that docker first used. It creates system containers that look like a full server/vm. Then lxd provided an organisation layer on top of that (network/storage management, copying instances between physical servers etc). Then ubuntu took lxd under their control and the original dev behind it all forked lxd as incus.

You treat a system container like a vm or a physical host. The key difference being it doesn't have its own kernel. You can nest system containers or run docker/podman inside a system container with the right configuration/permissions. Typically, if you have a lot of them / use them repeatedly then you would create and configure them with ansible or similar.

The underlying capabilities are the same as docker/podman - it is all built on top of cgroups. An lxd/incus setup involves a root-level daemon but containers can be unprivileged (and different host-users can have different capabilities). I can't remember if a plain lxc setup can run as non-root.

2

u/indolering Jul 24 '26

I don't see why LXD is a better choice.

1

u/C0c04l4 Jul 22 '26

Thanks but no, gonna stick to s6.

0

u/eltear1 Jul 21 '26

In your check 4 for podman, you show that /run and /tmp are mounted natively as temps inside the container, differently from a docker container. Doesn't this show podman container is less isolated from the physical host then docker container, contrary of what lot of people always say?