blob: b251d9684ded9e7ed24ccde5ddf408c3f8053d3e [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 Benkard7b2a3a12021-08-16 10:57:25 +02005ARG CLAMAV=0.103.2
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01006
7RUN apt-get update && apt-get install -y --no-install-recommends \
8 ca-certificates \
9 zlib1g-dev \
10 libcurl4-openssl-dev \
11 libncurses5-dev \
12 libzip-dev \
13 libpcre2-dev \
14 libxml2-dev \
15 libssl-dev \
16 build-essential \
17 libjson-c-dev \
18 curl \
19 bash \
20 wget \
21 tzdata \
22 dnsutils \
23 rsync \
24 dos2unix \
25 netcat \
26 && rm -rf /var/lib/apt/lists/* \
27 && wget -O - https://www.clamav.net/downloads/production/clamav-${CLAMAV}.tar.gz | tar xfvz - \
28 && cd clamav-${CLAMAV} \
29 && ./configure \
30 --prefix=/usr \
31 --libdir=/usr/lib \
32 --sysconfdir=/etc/clamav \
33 --mandir=/usr/share/man \
34 --infodir=/usr/share/info \
35 --disable-llvm \
36 --with-user=clamav \
37 --with-group=clamav \
38 --with-dbdir=/var/lib/clamav \
39 --enable-clamdtop \
40 --enable-bigstack \
41 --with-pcre \
42 && make -j4 \
43 && make install \
44 && make clean \
45 && cd .. && rm -rf clamav-${CLAMAV} \
46 && apt-get -y --auto-remove purge build-essential \
47 && apt-get -y purge zlib1g-dev \
48 libncurses5-dev \
49 libzip-dev \
50 libpcre2-dev \
51 libxml2-dev \
52 libssl-dev \
53 libjson-c-dev \
54 && addgroup --system --gid 700 clamav \
55 && adduser --system --no-create-home --home /var/lib/clamav --uid 700 --gid 700 --disabled-login clamav \
56 && rm -rf /tmp/* /var/tmp/*
57
58COPY clamd.sh ./
59COPY tini /sbin/tini
60
61CMD ["/sbin/tini", "-g", "--", "/clamd.sh"]