1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-05-21 22:33:16 +02:00

make antivirus-healthcheck more understandable

This commit is contained in:
Thomas Sänger 2018-10-16 22:30:15 +02:00
parent 040c1e529a
commit f0f5cea5d1
No known key found for this signature in database
GPG Key ID: 057DDBB960D5382D
2 changed files with 10 additions and 1 deletions

View File

@ -4,10 +4,11 @@ RUN apk add --no-cache clamav rsyslog wget clamav-libunrar
COPY conf /etc/clamav
COPY start.sh /start.sh
COPY health.sh /health.sh
EXPOSE 3310/tcp
VOLUME ["/data"]
CMD ["/start.sh"]
HEALTHCHECK CMD [ "$(echo PING | nc localhost 3310)" = "PONG" ]
HEALTHCHECK CMD /health.sh

8
optional/clamav/health.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ "$(echo PING | nc localhost 3310)" = "PONG" ]; then
echo "ping successful"
else
echo "ping failed"
exit 1
fi