From 44e6948598759568e292616be3ccfdf855efc661 Mon Sep 17 00:00:00 2001 From: TBK Date: Wed, 10 May 2017 18:10:04 +0200 Subject: [PATCH 1/2] Add VS Code to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c61097e9..fa19d204 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ data/conf/postfix/sql data/conf/dovecot/sql data/web/inc/vars.local.inc.php data/assets/ssl +.vscode/* From 2d0c4db2a579c4cc4f5fdc33727f6cf82c009c92 Mon Sep 17 00:00:00 2001 From: TBK Date: Sun, 28 May 2017 16:23:13 +0200 Subject: [PATCH 2/2] Clamav dockerfile simplification - Locked to specific release. - Fewer layers. - Size reduction of 49 MB. --- data/Dockerfiles/clamav/Dockerfile | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/data/Dockerfiles/clamav/Dockerfile b/data/Dockerfiles/clamav/Dockerfile index 3fd2a852..335e9ae5 100755 --- a/data/Dockerfiles/clamav/Dockerfile +++ b/data/Dockerfiles/clamav/Dockerfile @@ -1,30 +1,30 @@ -FROM alpine +FROM alpine:3.6 + LABEL maintainer "https://m-ko.de Markus Kosmal " -RUN apk add -U --no-cache clamav clamav-libunrar clamav-daemon bash curl +# Add scripts +COPY dl_files.sh bootstrap.sh ./ -# initial update of av databases -COPY dl_files.sh /dl_files.sh -RUN chmod +x /dl_files.sh +# Install Dependencies +RUN apk add --update \ +&& apk add --no-cache clamav clamav-libunrar curl bash \ +\ +# Update AV databases +&& chmod +x dl_files.sh \ +&& set -ex; /dl_files.sh \ +\ +# Setup run +&& mkdir /run/clamav \ +&& chown clamav:clamav /run/clamav \ +&& chmod 750 /run/clamav \ +\ +# AV configuration +&& sed -i '/Foreground yes/s/^#//g' /etc/clamav/clamd.conf \ +&& sed -i '/TCPSocket 3310/s/^#//g' /etc/clamav/clamd.conf \ +&& sed -i '/Foreground yes/s/^#//g' /etc/clamav/freshclam.conf -# pre-download defintions -RUN set -ex; \ - /dl_files.sh && \ - apk del curl - -# permission juggling -RUN mkdir -p /run/clamav && \ - chown clamav:clamav /run/clamav && \ - chmod 750 /run/clamav - -# 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 - -# port provision +# Port provision EXPOSE 3310 -# av daemon bootstrapping -COPY bootstrap.sh / +# AV daemon bootstrapping CMD ["/bootstrap.sh"]