Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | FROM debian:buster-slim |
| 2 | |
| 3 | LABEL maintainer "André Peters <andre.peters@servercow.de>" |
| 4 | |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 5 | ARG CLAMAV=0.103.4 |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 6 | RUN 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 Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 26 | && wget -O - https://fossies.org/linux/misc/clamav-${CLAMAV}.tar.gz | tar xfvz - \ |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 27 | && 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 | |
| 57 | COPY clamd.sh ./ |
| 58 | COPY tini /sbin/tini |
| 59 | |
| 60 | CMD ["/sbin/tini", "-g", "--", "/clamd.sh"] |