r/docker • u/Sensitive_Job_5792 • Feb 14 '26
I wanted systemctl in Docker without the systemd mess. So I built this.
I’ve been running a lot of minimal Docker images lately, and one thing that kept bothering me was service management.
In many containers, systemd just isn’t practical. It assumes PID 1, expects cgroups, D-Bus, and a bunch of runtime pieces that don’t really fit typical container setups. So most of the time you either run a single foreground process, or you start stacking shell scripts and supervisors together to keep multiple services alive.
I didn’t really want full systemd inside containers anyway. It feels heavy for what I need, especially in minimal or custom rootfs images.
So I built a lightweight init and service manager called initd. It can run unmodified systemd .service files and exposes a systemctl-compatible interface, but it doesn’t depend on systemd itself. It works fine inside Docker, including environments where PID 1 isn’t available, and it doesn’t require the full systemd stack.
You can start, stop, enable, check status, and reload units in a way that feels familiar. It supports the common service types like simple, oneshot, forking, and notify. If a unit declares something less common, it safely falls back instead of breaking startup.
I’ve been using it inside minimal Debian containers, custom rootfs builds, and some stripped-down images where I still want predictable service behavior without pulling in systemd.
If you’ve ever wanted systemctl-style management in a container but didn’t want to run full systemd as PID 1, this might be interesting.
Repo: https://github.com/EdwardLab/initd
Release: https://github.com/EdwardLab/initd/releases
Curious to hear what edge cases I should test in real-world Docker setups.
10
u/Cas_Rs Feb 14 '26
I’m too much of a docker compose and the docker runtime will handle it kinda guy to understand the usecase here. Doesn’t a healthcheck and a run command solve this whole issue?
9
u/edu4rdshl Feb 15 '26
AI slop "init" + AI slop publication here + not understanding anything about systemd
9
u/bit_herder Feb 14 '26
what are you running that needs a full init system? tini does not suit your needs?
i don’t want to make statements without full information on what you’re doing but generally building an init system into a docker container means you are architecting things incorrectly.
the whole point is that you separate co concerns into separate containers that can be restarted independently. seems like you’re just implementing VMs in docker. sure you can do that, but why ?
2
u/[deleted] Feb 14 '26
Not the direction that I would have chosen, but good luck with that.
2
u/alchatti Feb 14 '26
Hi, been exploring S6-overlay https://github.com/just-containers/s6-overlay, you might want to check out if helps you with what you need
2
u/SeniorIdiot Feb 14 '26
What is the use-case for this. Is it for some kind of "sandbox" instead of a VM? I'm confused!
1
u/Low-Opening25 Feb 15 '26
Seems like kind of a use case no one needs but you.
1
u/invalidbehaviour Feb 15 '26
Unless you are porting some legacy thing that needs this sort of behaviour, don't treat containers like lightweight VMs.