Browse Source

Implement signal handling

master
Jan Dittberner 9 months ago
committed by Jan Dittberner
parent
commit
fd9d45668b
  1. 12
      cats.Dockerfile
  2. 2
      docker/run-dovecot
  3. 2
      docker/run-postfix
  4. 12
      mgr.Dockerfile
  5. 12
      webdb.Dockerfile

12
cats.Dockerfile

@ -11,9 +11,10 @@ RUN apt-get update \
nullmailer \
php5-mysql \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
STOPSIGNAL SIGWINCH
&& rm -rf /var/lib/apt/lists/* \
&& curl --silent --location --output /usr/local/bin/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v1.2.4/dumb-init_1.2.4_x86_64 \
&& chmod +x /usr/local/bin/dumb-init
COPY docker/apache-cats-foreground /usr/local/bin/
COPY testca/root/ca.crt.pem /usr/local/share/ca-certificates/testca_root.crt
@ -33,10 +34,11 @@ RUN a2ensite cats.cacert.localhost ; \
a2enmod rewrite ; \
a2enmod ssl ; \
cd /usr/local/share/ca-certificates ; \
curl -O http://www.cacert.org/certs/root_X0F.crt ; \
curl -O http://www.cacert.org/certs/class3_X0E.crt ; \
curl --silent --remote-name http://www.cacert.org/certs/root_X0F.crt ; \
curl --silent --remote-name http://www.cacert.org/certs/class3_X0E.crt ; \
update-ca-certificates
EXPOSE 443
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["/usr/local/bin/apache-cats-foreground"]

2
docker/run-dovecot

@ -7,4 +7,6 @@ chmod 0640 /etc/dovecot/imap_user.txt
chown dovecot.dovecot /etc/dovecot/imap_user.txt
echo "log_path = /dev/stderr" > /etc/dovecot/local.conf
trap "exit 0" TERM INT
dovecot -F

2
docker/run-postfix

@ -4,4 +4,6 @@ set -eu
mkdir -p /home/catchall/Maildir/tmp /home/catchall/Maildir/new /home/catchall/Maildir/cur
chown -Rc catchall.catchall /home/catchall/Maildir
trap "exit 0" INT TERM
postfix start-fg

12
mgr.Dockerfile

@ -14,9 +14,10 @@ RUN apt-get update \
php5-mysql \
zendframework \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
STOPSIGNAL SIGWINCH
&& rm -rf /var/lib/apt/lists/* \
&& curl --silent --location --output /usr/local/bin/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v1.2.4/dumb-init_1.2.4_x86_64 \
&& chmod +x /usr/local/bin/dumb-init
COPY docker/apache-mgr-foreground /usr/local/bin/
COPY testca/root/ca.crt.pem /usr/local/share/ca-certificates/testca_root.crt
@ -37,10 +38,11 @@ RUN a2ensite mgr.cacert.localhost ; \
a2enmod rewrite ; \
a2enmod ssl ; \
cd /usr/local/share/ca-certificates ; \
curl -O http://www.cacert.org/certs/root_X0F.crt ; \
curl -O http://www.cacert.org/certs/class3_X0E.crt ; \
curl --silent --remote-name http://www.cacert.org/certs/root_X0F.crt ; \
curl --silent --remote-name http://www.cacert.org/certs/class3_X0E.crt ; \
update-ca-certificates
EXPOSE 443
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["/usr/local/bin/apache-mgr-foreground"]

12
webdb.Dockerfile

@ -37,9 +37,10 @@ RUN apt-get update \
wamerican \
whois \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
STOPSIGNAL SIGWINCH
&& rm -rf /var/lib/apt/lists/* \
&& curl --silent --location --output /usr/local/bin/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v1.2.4/dumb-init_1.2.4_x86_64 \
&& chmod +x /usr/local/bin/dumb-init
COPY docker/apache-webdb-foreground /usr/local/bin/
COPY testca/root/ca.crt.pem /usr/local/share/ca-certificates/testca_root.crt
@ -64,11 +65,12 @@ RUN a2ensite www.cacert.localhost ; \
a2enmod ssl ; \
ln -s /etc/php5/mods-available/cacert.ini /etc/php5/apache2/conf.d/20-cacert.ini ; \
cd /usr/local/share/ca-certificates ; \
curl -O http://www.cacert.org/certs/root_X0F.crt ; \
curl -O http://www.cacert.org/certs/class3_X0E.crt ; \
curl --silent --remote-name http://www.cacert.org/certs/root_X0F.crt ; \
curl --silent --remote-name http://www.cacert.org/certs/class3_X0E.crt ; \
update-ca-certificates
EXPOSE 80
EXPOSE 443
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
CMD ["/usr/local/bin/apache-webdb-foreground"]

Loading…
Cancel
Save