I have two Docker containers:
1 for Keepalived 1 for Haproxy
The problem is that my track_script killall -0 haproxy
(to check if haproxy is still alive) can't reach the process of haproxy (because it is in another container..)
What should I do ?
Thanks!
Nothing. If the main process in a container exits, the container will exit too; Docker does this automatically, and you shouldn't (and for the most part can't) check on an individual process in another container.
You can use a restart policy to have Docker automatically restart a container, and its contained process, if it happens to exit: