Open kasbert opened 6 months ago
As a workaround I use tini as the entrypoint
FROM ubuntu:22.04
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends monit tini && \
apt clean
RUN \
printf '#!/bin/bash\nnohup date&' > /necromancer && \
chmod 755 /necromancer && \
printf 'check process hello matching nothing start "/necromancer"' > /etc/monit/conf-enabled/hello
ENTRYPOINT ["tini"]
CMD ["-vv", "-g", "--", "monit", "-I", "-B", "-v" , "-d", "10"]
If monit is used as init process in docker, it does not reap extra zombie processes created by services. It would be nice, if it did so.
Example Dockerfile:
Build and run:
The zombie processes start invading the container: