Fix zombie reaping problem with Docker gitlab-runner image
This refers to:
https://hub.docker.com/r/gitlab/gitlab-runner/
I think that fixing the "zombie process reaping problem" would be nice, especially because build runners tend to fork tons of processes, so you end up with tons of DEFUNCT git processes etc if you use this Dockerfile for a runner.
In my own configuration, I've used this dumb-init project as my entry point. dumb-init handles signalling to the child processes, and handles reaping of zombie processes.
To do so, I've added the following to my Dockerfile:
RUN wget https://github.com/Yelp/dumb-init/releases/download/v1.0.0/dumb-init_1.0.0_amd64.deb
RUN dpkg -i dumb-init_*.deb
ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint"]
CMD ["run", "--user=gitlab-runner", "--working-directory=/home/gitlab-runner"]
Now I no longer get zombie git processing hanging around after builds. I suggest something similar for the gitlab runner. Given the MIT license of the dumb-init project, you can feel free to use it I would think.