2019-01-08 19:54:33 +08:00
|
|
|
FROM debian:stretch-slim
|
2017-02-22 05:26:20 +08:00
|
|
|
|
2017-05-30 03:50:43 +08:00
|
|
|
LABEL maintainer "André Peters <andre.peters@servercow.de>"
|
2017-02-22 05:26:20 +08:00
|
|
|
|
2017-05-30 03:50:43 +08:00
|
|
|
# Installation
|
2019-08-22 03:06:14 +08:00
|
|
|
ENV CLAMAV 0.101.4
|
2018-01-27 17:26:06 +08:00
|
|
|
|
2019-01-08 19:54:33 +08:00
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
ca-certificates \
|
|
|
|
zlib1g-dev \
|
|
|
|
libncurses5-dev \
|
|
|
|
libzip-dev \
|
|
|
|
libpcre2-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libssl-dev \
|
|
|
|
build-essential \
|
|
|
|
libjson-c-dev \
|
|
|
|
curl \
|
|
|
|
bash \
|
|
|
|
wget \
|
|
|
|
tzdata \
|
|
|
|
dnsutils \
|
|
|
|
rsync \
|
|
|
|
dos2unix \
|
|
|
|
netcat \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2018-01-27 17:26:06 +08:00
|
|
|
&& wget -O - https://www.clamav.net/downloads/production/clamav-${CLAMAV}.tar.gz | tar xfvz - \
|
|
|
|
&& cd clamav-${CLAMAV} \
|
2019-01-08 19:54:33 +08:00
|
|
|
&& ./configure \
|
2018-01-27 17:26:06 +08:00
|
|
|
--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} \
|
2019-01-08 19:54:33 +08:00
|
|
|
&& 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 \
|
2019-01-13 18:21:44 +08:00
|
|
|
&& adduser --system --no-create-home --home /var/lib/clamav --uid 700 --gid 700 --disabled-login clamav \
|
2019-01-08 19:54:33 +08:00
|
|
|
&& rm -rf /tmp/* /var/tmp/*
|
2017-02-22 05:26:20 +08:00
|
|
|
|
2019-10-18 18:01:47 +08:00
|
|
|
COPY clamd.sh ./
|
2019-01-08 19:54:33 +08:00
|
|
|
COPY tini /sbin/tini
|
2017-02-22 05:26:20 +08:00
|
|
|
|
2019-10-18 18:01:47 +08:00
|
|
|
CMD ["/sbin/tini", "-g", "--", "/clamd.sh"]
|