public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
Clamd: Fix Docker Healthcheck
537a7908
data/Dockerfiles/clamd/Dockerfile | 8 +++++++-
data/Dockerfiles/clamd/healthcheck.sh | 9 +++++++++
docker-compose.yml | 2 +-
3 files changed, 17 insertions(+), 2 deletions(-)
create mode 100755 data/Dockerfiles/clamd/healthcheck.sh
Diff
diff --git a/data/Dockerfiles/clamd/Dockerfile b/data/Dockerfiles/clamd/Dockerfile
index a4971133..cba56e03 100644
--- a/data/Dockerfiles/clamd/Dockerfile
+++ b/data/Dockerfiles/clamd/Dockerfile
@@ -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"]
\ No newline at end of file
diff --git a/data/Dockerfiles/clamd/healthcheck.sh b/data/Dockerfiles/clamd/healthcheck.sh
new file mode 100755
index 00000000..6c18ac06
--- /dev/null
+++ b/data/Dockerfiles/clamd/healthcheck.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
diff --git a/docker-compose.yml b/docker-compose.yml
index e3b08637..b8276411 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -58,7 +58,7 @@ services:
- redis
clamd-mailcow:
- image: mailcow/clamd:1.52
+ image: mailcow/clamd:1.53
restart: always
depends_on:
- unbound-mailcow