-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can dumb-init not run in daemon mod? #179
Comments
The answer to the question is no, by design. I believe you want |
Just to clarify, I think the issue is that keepalived is daemonizing, rather than dumb-init? |
Yes, @asottile if use -n flag keepalived will not fork a child process, script check will not work.
It useful for many daemons run in the container, I think dumb-init support this will be great! |
hmmm I suspect you're missing the point of dumb-init (and to some extent, docker containers in general) docker is not intended to be a virtual machine manager. An ideal container runs a single process (-tree) which does one thing. dumb-init assists in this manner as being the init system for that single process (and forwards signals to it). dumb-init is not a supervisor -- it will not restart your process if it dies and will not health check your process. dumb-init is also not a daemon manager -- you shouldn't daemonize your application in docker, you should run it in the foreground. That said, if you want to bend the rules, you can run a supervisor or a daemon manager. For example it isn't all that uncommon to have a process tree that looks like Usually you'll want to use docker containers in conjunction with some sort of framework such as kubernetes / mesos which will provide the health checking / container management -- trying to have a container healthcheck itself doesn't really make all that much sense in that context. |
I strongly follow the one container single process principle, but if I want to run some process like keepalived in a container will cause some problems. I don't need a supervisor, don't need daemon manager or health check, just need dumb-init support run in the foreground... By the way, this issue is clearly not caused by dumb-init |
dumb-init only supports running in the foreground -- and with keepalived the way to do that is by using |
Yes keepalived -n flag will cause keepalived don't fork a child process, and check script will not work.
|
what do you mean "check script" |
We want to use dumb-init to start keepalived in the container, but it runs as daemon mod, so container exists immediately. Can dumb-init run on the front?
The text was updated successfully, but these errors were encountered: