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:
parent
040c1e529a
commit
f0f5cea5d1
@ -4,10 +4,11 @@ RUN apk add --no-cache clamav rsyslog wget clamav-libunrar
|
|||||||
|
|
||||||
COPY conf /etc/clamav
|
COPY conf /etc/clamav
|
||||||
COPY start.sh /start.sh
|
COPY start.sh /start.sh
|
||||||
|
COPY health.sh /health.sh
|
||||||
|
|
||||||
EXPOSE 3310/tcp
|
EXPOSE 3310/tcp
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
|
||||||
HEALTHCHECK CMD [ "$(echo PING | nc localhost 3310)" = "PONG" ]
|
HEALTHCHECK CMD /health.sh
|
||||||
|
8
optional/clamav/health.sh
Executable file
8
optional/clamav/health.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user