2017-05-17 13:48:48 +08:00
|
|
|
FROM alpine
|
2017-05-13 21:33:32 +08:00
|
|
|
LABEL maintainer "https://m-ko.de Markus Kosmal <code@cnfg.io>"
|
2017-02-22 05:26:20 +08:00
|
|
|
|
2017-05-17 13:48:48 +08:00
|
|
|
RUN apk add -U --no-cache clamav clamav-libunrar clamav-daemon bash curl
|
2017-02-22 05:26:20 +08:00
|
|
|
|
|
|
|
# initial update of av databases
|
2017-04-21 03:13:41 +08:00
|
|
|
COPY dl_files.sh /dl_files.sh
|
|
|
|
RUN chmod +x /dl_files.sh
|
2017-05-13 22:28:23 +08:00
|
|
|
|
2017-05-17 13:48:48 +08:00
|
|
|
# pre-download defintions
|
2017-05-13 22:28:23 +08:00
|
|
|
RUN set -ex; \
|
2017-05-17 13:48:48 +08:00
|
|
|
/dl_files.sh && \
|
|
|
|
apk del curl
|
2017-02-22 05:26:20 +08:00
|
|
|
|
|
|
|
# permission juggling
|
2017-05-17 13:48:48 +08:00
|
|
|
RUN mkdir -p /run/clamav && \
|
|
|
|
chown clamav:clamav /run/clamav && \
|
|
|
|
chmod 750 /run/clamav
|
2017-02-22 05:26:20 +08:00
|
|
|
|
|
|
|
# av configuration update
|
|
|
|
RUN sed -i 's/^Foreground .*$/Foreground true/g' /etc/clamav/clamd.conf && \
|
2017-05-13 02:54:23 +08:00
|
|
|
echo "TCPSocket 3310" >> /etc/clamav/clamd.conf && \
|
|
|
|
sed -i 's/^Foreground .*$/Foreground true/g' /etc/clamav/freshclam.conf
|
2017-02-22 05:26:20 +08:00
|
|
|
|
|
|
|
# port provision
|
|
|
|
EXPOSE 3310
|
|
|
|
|
|
|
|
# av daemon bootstrapping
|
2017-03-07 22:44:37 +08:00
|
|
|
COPY bootstrap.sh /
|
2017-02-22 05:26:20 +08:00
|
|
|
CMD ["/bootstrap.sh"]
|