blob: e14858f4944e9354d3fcc5e289a984101a2a1365 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001FROM debian:buster-slim
2
3LABEL maintainer "André Peters <andre.peters@servercow.de>"
4
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01005ARG CLAMAV=0.103.4
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01006RUN apt-get update && apt-get install -y --no-install-recommends \
7 ca-certificates \
8 zlib1g-dev \
9 libcurl4-openssl-dev \
10 libncurses5-dev \
11 libzip-dev \
12 libpcre2-dev \
13 libxml2-dev \
14 libssl-dev \
15 build-essential \
16 libjson-c-dev \
17 curl \
18 bash \
19 wget \
20 tzdata \
21 dnsutils \
22 rsync \
23 dos2unix \
24 netcat \
25 && rm -rf /var/lib/apt/lists/* \
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010026 && wget -O - https://fossies.org/linux/misc/clamav-${CLAMAV}.tar.gz | tar xfvz - \
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010027 && cd clamav-${CLAMAV} \
28 && ./configure \
29 --prefix=/usr \
30 --libdir=/usr/lib \
31 --sysconfdir=/etc/clamav \
32 --mandir=/usr/share/man \
33 --infodir=/usr/share/info \
34 --disable-llvm \
35 --with-user=clamav \
36 --with-group=clamav \
37 --with-dbdir=/var/lib/clamav \
38 --enable-clamdtop \
39 --enable-bigstack \
40 --with-pcre \
41 && make -j4 \
42 && make install \
43 && make clean \
44 && cd .. && rm -rf clamav-${CLAMAV} \
45 && apt-get -y --auto-remove purge build-essential \
46 && apt-get -y purge zlib1g-dev \
47 libncurses5-dev \
48 libzip-dev \
49 libpcre2-dev \
50 libxml2-dev \
51 libssl-dev \
52 libjson-c-dev \
53 && addgroup --system --gid 700 clamav \
54 && adduser --system --no-create-home --home /var/lib/clamav --uid 700 --gid 700 --disabled-login clamav \
55 && rm -rf /tmp/* /var/tmp/*
56
57COPY clamd.sh ./
58COPY tini /sbin/tini
59
60CMD ["/sbin/tini", "-g", "--", "/clamd.sh"]