forked from jan/cacert-devsetup
Implement signal handling
This commit is contained in:
parent
aa9685aa27
commit
fd9d45668b
5 changed files with 25 additions and 15 deletions
|
@ -11,9 +11,10 @@ RUN apt-get update \
|
||||||
nullmailer \
|
nullmailer \
|
||||||
php5-mysql \
|
php5-mysql \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& curl --silent --location --output /usr/local/bin/dumb-init \
|
||||||
STOPSIGNAL SIGWINCH
|
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 docker/apache-cats-foreground /usr/local/bin/
|
||||||
COPY testca/root/ca.crt.pem /usr/local/share/ca-certificates/testca_root.crt
|
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 rewrite ; \
|
||||||
a2enmod ssl ; \
|
a2enmod ssl ; \
|
||||||
cd /usr/local/share/ca-certificates ; \
|
cd /usr/local/share/ca-certificates ; \
|
||||||
curl -O http://www.cacert.org/certs/root_X0F.crt ; \
|
curl --silent --remote-name 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/class3_X0E.crt ; \
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
|
||||||
CMD ["/usr/local/bin/apache-cats-foreground"]
|
CMD ["/usr/local/bin/apache-cats-foreground"]
|
||||||
|
|
|
@ -7,4 +7,6 @@ chmod 0640 /etc/dovecot/imap_user.txt
|
||||||
chown dovecot.dovecot /etc/dovecot/imap_user.txt
|
chown dovecot.dovecot /etc/dovecot/imap_user.txt
|
||||||
echo "log_path = /dev/stderr" > /etc/dovecot/local.conf
|
echo "log_path = /dev/stderr" > /etc/dovecot/local.conf
|
||||||
|
|
||||||
|
trap "exit 0" TERM INT
|
||||||
|
|
||||||
dovecot -F
|
dovecot -F
|
||||||
|
|
|
@ -4,4 +4,6 @@ set -eu
|
||||||
mkdir -p /home/catchall/Maildir/tmp /home/catchall/Maildir/new /home/catchall/Maildir/cur
|
mkdir -p /home/catchall/Maildir/tmp /home/catchall/Maildir/new /home/catchall/Maildir/cur
|
||||||
chown -Rc catchall.catchall /home/catchall/Maildir
|
chown -Rc catchall.catchall /home/catchall/Maildir
|
||||||
|
|
||||||
|
trap "exit 0" INT TERM
|
||||||
|
|
||||||
postfix start-fg
|
postfix start-fg
|
||||||
|
|
|
@ -14,9 +14,10 @@ RUN apt-get update \
|
||||||
php5-mysql \
|
php5-mysql \
|
||||||
zendframework \
|
zendframework \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& curl --silent --location --output /usr/local/bin/dumb-init \
|
||||||
STOPSIGNAL SIGWINCH
|
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 docker/apache-mgr-foreground /usr/local/bin/
|
||||||
COPY testca/root/ca.crt.pem /usr/local/share/ca-certificates/testca_root.crt
|
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 rewrite ; \
|
||||||
a2enmod ssl ; \
|
a2enmod ssl ; \
|
||||||
cd /usr/local/share/ca-certificates ; \
|
cd /usr/local/share/ca-certificates ; \
|
||||||
curl -O http://www.cacert.org/certs/root_X0F.crt ; \
|
curl --silent --remote-name 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/class3_X0E.crt ; \
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
|
||||||
CMD ["/usr/local/bin/apache-mgr-foreground"]
|
CMD ["/usr/local/bin/apache-mgr-foreground"]
|
||||||
|
|
|
@ -37,9 +37,10 @@ RUN apt-get update \
|
||||||
wamerican \
|
wamerican \
|
||||||
whois \
|
whois \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& curl --silent --location --output /usr/local/bin/dumb-init \
|
||||||
STOPSIGNAL SIGWINCH
|
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 docker/apache-webdb-foreground /usr/local/bin/
|
||||||
COPY testca/root/ca.crt.pem /usr/local/share/ca-certificates/testca_root.crt
|
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 ; \
|
a2enmod ssl ; \
|
||||||
ln -s /etc/php5/mods-available/cacert.ini /etc/php5/apache2/conf.d/20-cacert.ini ; \
|
ln -s /etc/php5/mods-available/cacert.ini /etc/php5/apache2/conf.d/20-cacert.ini ; \
|
||||||
cd /usr/local/share/ca-certificates ; \
|
cd /usr/local/share/ca-certificates ; \
|
||||||
curl -O http://www.cacert.org/certs/root_X0F.crt ; \
|
curl --silent --remote-name 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/class3_X0E.crt ; \
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
|
||||||
CMD ["/usr/local/bin/apache-webdb-foreground"]
|
CMD ["/usr/local/bin/apache-webdb-foreground"]
|
||||||
|
|
Loading…
Reference in a new issue