git subrepo commit mailcow/src/mailcow-dockerized
subrepo: subdir: "mailcow/src/mailcow-dockerized"
merged: "308860af"
upstream: origin: "https://github.com/mailcow/mailcow-dockerized.git"
branch: "master"
commit: "3f1a5af8"
git-subrepo: version: "0.4.5"
origin: "???"
commit: "???"
Change-Id: I5d51c14b45db54fe706be40a591ddbfcea50d4b0
diff --git a/mailcow/src/mailcow-dockerized/data/Dockerfiles/clamd/Dockerfile b/mailcow/src/mailcow-dockerized/data/Dockerfiles/clamd/Dockerfile
index e14858f..91716b8 100644
--- a/mailcow/src/mailcow-dockerized/data/Dockerfiles/clamd/Dockerfile
+++ b/mailcow/src/mailcow-dockerized/data/Dockerfiles/clamd/Dockerfile
@@ -1,60 +1,21 @@
-FROM debian:buster-slim
+FROM clamav/clamav:1.0_base
LABEL maintainer "André Peters <andre.peters@servercow.de>"
-ARG CLAMAV=0.103.4
-RUN apt-get update && apt-get install -y --no-install-recommends \
- ca-certificates \
- zlib1g-dev \
- libcurl4-openssl-dev \
- libncurses5-dev \
- libzip-dev \
- libpcre2-dev \
- libxml2-dev \
- libssl-dev \
- build-essential \
- libjson-c-dev \
- curl \
- bash \
- wget \
- tzdata \
- dnsutils \
+RUN apk upgrade --no-cache \
+ && apk add --update --no-cache \
rsync \
- dos2unix \
- netcat \
- && rm -rf /var/lib/apt/lists/* \
- && wget -O - https://fossies.org/linux/misc/clamav-${CLAMAV}.tar.gz | tar xfvz - \
- && cd clamav-${CLAMAV} \
- && ./configure \
- --prefix=/usr \
- --libdir=/usr/lib \
- --sysconfdir=/etc/clamav \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --disable-llvm \
- --with-user=clamav \
- --with-group=clamav \
- --with-dbdir=/var/lib/clamav \
- --enable-clamdtop \
- --enable-bigstack \
- --with-pcre \
- && make -j4 \
- && make install \
- && make clean \
- && cd .. && rm -rf clamav-${CLAMAV} \
- && apt-get -y --auto-remove purge build-essential \
- && apt-get -y purge zlib1g-dev \
- libncurses5-dev \
- libzip-dev \
- libpcre2-dev \
- libxml2-dev \
- libssl-dev \
- libjson-c-dev \
- && addgroup --system --gid 700 clamav \
- && adduser --system --no-create-home --home /var/lib/clamav --uid 700 --gid 700 --disabled-login clamav \
- && rm -rf /tmp/* /var/tmp/*
+ bind-tools \
+ bash
-COPY clamd.sh ./
-COPY tini /sbin/tini
+# init
+COPY clamd.sh /clamd.sh
+RUN chmod +x /sbin/tini
-CMD ["/sbin/tini", "-g", "--", "/clamd.sh"]
+# 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