Attempt to prevent zombie processes when run under systemd
When systemd restarts the transmission-openvpn container, it seems to leave zombie processes as below. $ ps uaxww | grep Z root 1872 0.0 0.0 0 0 ? Z 08:58 0:00 [transmission-da] <defunct> The zombies do appear to be cleaned up by restarting docker itself, or by stopping the transmission-openvpn service. This is an attempt to prevent zombies being spawned via Yelp's dumb-init, which correctly handles the signals that PID1 gets. See: https://github.com/Yelp/dumb-init
This commit is contained in:
@@ -16,6 +16,9 @@ RUN apt-get update \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y transmission-cli transmission-common transmission-daemon \
|
||||
&& apt-get install -y openvpn curl rar unrar zip unzip \
|
||||
&& curl -sLO https://github.com/Yelp/dumb-init/releases/download/v1.0.1/dumb-init_1.0.1_amd64.deb \
|
||||
&& dpkg -i dumb-init_*.deb \
|
||||
&& rm -rf dumb-init_*.deb \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& curl -L https://github.com/jwilder/dockerize/releases/download/v0.0.2/dockerize-linux-amd64-v0.0.2.tar.gz | tar -C /usr/local/bin -xzv
|
||||
|
||||
@@ -101,4 +104,4 @@ ENV OPENVPN_USERNAME=**None** \
|
||||
|
||||
# Expose port and run
|
||||
EXPOSE 9091
|
||||
CMD ["/etc/openvpn/start.sh"]
|
||||
CMD ["dumb-init", "/etc/openvpn/start.sh"]
|
||||
|
Reference in New Issue
Block a user