commercialhaskell / commercialhaskell/stack

Use a proper init for Docker images

Open
#2,498 4 comments 0 reactions 0 assignees View on GitHub
component: docker type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

@borsboom [wrote](https://github.com/commercialhaskell/stack/pull/2474#issuecomment-239212520):

> 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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.