You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for the Docker case, maybe we should go back to having a separate 'init' process. We used to use phusion/baseimage's my_init in the containers but eliminated that for faster startup and compatibility with non-FP Complete-generated images. At that time we considered whether we should introduce our own extra 'init' process but decided to try without and see how it went.
I agree. IMHO Docker images should always use a proper init process. Even if you run GHC directly:
signal handling will be different without an init process (signals without handler will be ignored)
zombie processes won't be reaped
more stuff might go wrong.
Minimal init binaries include dumb-init (used in the past by @snoyberg) and tini (used by me). I'll favor the smallest/most portable/possibly statically linked one. #2474 was about a container launched manually, but IIUC the issue is still there for Stack Docker containers (to verify).
The text was updated successfully, but these errors were encountered:
I'd like to avoid needing the Docker image to contain anything special (like dumb-init or tini), because that makes it harder to use arbitrary images (like the official Haskell images). Also, in my experience, those init processes tend to interfere with Stack's somewhat complex re-launching of itself in a container (although I haven't tried either dumb-init or tini).
Rather, stack can act as its own init process (basically detect that it's pid 1 in a container and if so fork itself and let the original process just reap zombies).
Rather, stack can act as its own init process (basically detect that it's pid 1 in a container and if so fork itself and let the original process just reap zombies).
Are you describing existing code or suggesting that somebody writes it?
My 2 cents: I'd say make it a lib (exposing initMain :: IO ()) that can be linked in stack and used externally (with main = initMain), so this can be leveraged elsewhere.
@borsboom wrote:
I agree. IMHO Docker images should always use a proper init process. Even if you run GHC directly:
Minimal init binaries include dumb-init (used in the past by @snoyberg) and tini (used by me). I'll favor the smallest/most portable/possibly statically linked one.
#2474 was about a container launched manually, but IIUC the issue is still there for Stack Docker containers (to verify).
The text was updated successfully, but these errors were encountered: