1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-14 10:52:49 +02:00
mailcow-dockerized/data/Dockerfiles/clamav/Dockerfile

41 lines
1.3 KiB
Docker
Raw Normal View History

2017-04-20 21:13:41 +02:00
FROM debian:stretch-slim
2017-02-21 23:26:20 +02:00
MAINTAINER https://m-ko.de Markus Kosmal <code@cnfg.io>
# Debian Base to use
2017-04-20 21:13:41 +02:00
ENV DEBIAN_VERSION stretch
2017-02-21 23:26:20 +02:00
# initial install of av daemon
RUN echo "deb http://http.debian.net/debian/ $DEBIAN_VERSION main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://http.debian.net/debian/ $DEBIAN_VERSION-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://security.debian.org/ $DEBIAN_VERSION/updates main contrib non-free" >> /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y -qq \
clamav-daemon \
clamav-freshclam \
libclamunrar7 \
curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
2017-02-21 23:26:20 +02:00
# initial update of av databases
2017-04-20 21:13:41 +02:00
COPY dl_files.sh /dl_files.sh
RUN chmod +x /dl_files.sh
RUN /dl_files.sh
2017-02-21 23:26:20 +02:00
# permission juggling
RUN mkdir /var/run/clamav && \
chown clamav:clamav /var/run/clamav && \
chmod 750 /var/run/clamav
2017-02-21 23:26:20 +02:00
# av configuration update
RUN sed -i 's/^Foreground .*$/Foreground true/g' /etc/clamav/clamd.conf && \
echo "TCPSocket 3310" >> /etc/clamav/clamd.conf && \
sed -i 's/^Foreground .*$/Foreground true/g' /etc/clamav/freshclam.conf
2017-02-21 23:26:20 +02:00
# port provision
EXPOSE 3310
# av daemon bootstrapping
2017-03-07 16:44:37 +02:00
COPY bootstrap.sh /
2017-02-21 23:26:20 +02:00
CMD ["/bootstrap.sh"]