@@ -8,8 +8,14 @@ RUN apk upgrade --no-cache \
bind-tools \
bash
-COPY clamd.sh ./
+# init
+COPY clamd.sh /clamd.sh
RUN chmod +x /sbin/tini
+# healthcheck
+COPY healthcheck.sh /healthcheck.sh
+RUN chmod +x /healthcheck.sh
+HEALTHCHECK --start-period=6m CMD "/healthcheck.sh"
+
ENTRYPOINT []
CMD ["/sbin/tini", "-g", "--", "/clamd.sh"]
@@ -0,0 +1,9 @@
+#!/bin/bash
+if [[ "${SKIP_CLAMD}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
+ echo "SKIP_CLAMD=y, skipping ClamAV..."
+ exit 0
+fi
+# run clamd healthcheck
+/usr/local/bin/clamdcheck.sh
@@ -58,7 +58,7 @@ services:
- redis
clamd-mailcow:
- image: mailcow/clamd:1.52
+ image: mailcow/clamd:1.53
restart: always
depends_on:
- unbound-mailcow