Fix Rspamd Dockerfiles

This commit is contained in:
andryyy 2017-03-03 23:31:32 +01:00
parent 614da27c03
commit 66cbc479d7
2 changed files with 12 additions and 11 deletions

View File

@ -18,10 +18,11 @@ RUN echo '.include $LOCAL_CONFDIR/local.d/rspamd.conf.local' > /etc/rspamd/rspam
ADD settings.conf /etc/rspamd/modules.d/settings.conf ADD settings.conf /etc/rspamd/modules.d/settings.conf
ADD antivirus.conf /etc/rspamd/modules.d/antivirus.conf ADD antivirus.conf /etc/rspamd/modules.d/antivirus.conf
ADD docker-entrypoint.sh /usr/local/bin ADD docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN pip install -U oletools RUN pip install -U oletools
RUN timeout 30 /usr/bin/rspamd -f -u _rspamd -g _rspamd; exit 0 RUN timeout 30 /usr/bin/rspamd -f -u _rspamd -g _rspamd; exit 0
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
while true; do while true; do
SC=$(curl -s -o /dev/null -w "%{http_code}" http://nginx:8081/settings.php) SC=$(curl -s -o /dev/null -w "%{http_code}" http://nginx:8081/settings.php)
if [[ ${SC} == "200" ]]; then if [[ ${SC} == "200" ]]; then
sleep 3 sleep 3
exec "$@" exec "$@"
fi fi
sleep 3 sleep 3
done done