Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Damn. So I'm just a simple Debian user. Systemd showed up, so I learned as much as I needed. And in some ways, I found it easier to use than init scripts.

Now I've been using Docker. And there is no systemd in containers. But of course, why would you want that? But the problem is that many packages now depend on systemd. Or at least, useful features do. So I'm back to fighting with scripts. It's funny, no?



Maybe you wouldn't want systemd, but a basic init system as PID 1 is wise for a Docker container. See https://github.com/Yelp/dumb-init


Wow. Thanks.

I've been wondering about all those zombies.


I would suggest https://github.com/openSUSE/catatonit (self-plug -- I wrote it). dumb-init (and tini which is what "docker run --init" uses) don't handle zombies in the most ideal fashion possible, catatonit does. And it does so in less code.


Thanks. I use "docker run --init", and there are indeed zombies :(

I play a lot with shell scripts, and ps gets littered with grep and awk.


Why are you saying there's no systemd in containers? Systemd works perfectly both outside and inside containers, docker or any others.


I'm sure it does, however it's supposed to.

What I mean is that systemctl isn't available in containers:

   root@foo:~# systemctl status sshd
   bash: systemctl: command not found


Yeah, I know that I ought to be managing services in containers with systemctl in the host. I just haven't learned that yet.


That means only that you run an OS without systemd inside the container. Which you are not required to.


> And there is no systemd in containers. But of course, why would you want that?

I knew a guy who invented an orchestration system that involved shoving an init process into docker containers. Much sadness ensued.


Are you referring to dumb-init?

Is there a better way to reap zombies?


> Are you referring to dumb-init?

Nope.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: