From e081a847a19d841f2e269c5521a7d8ff92f8f110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Sat, 13 May 2017 16:28:23 +0200 Subject: [PATCH] [Dockerfiles] Do not keep curl installed --- data/Dockerfiles/clamav/Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/clamav/Dockerfile b/data/Dockerfiles/clamav/Dockerfile index 63dcf118..ce37fe25 100755 --- a/data/Dockerfiles/clamav/Dockerfile +++ b/data/Dockerfiles/clamav/Dockerfile @@ -11,14 +11,23 @@ RUN echo "deb http://http.debian.net/debian/ $DEBIAN_VERSION main contrib non-fr apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \ clamav-daemon \ clamav-freshclam \ - curl \ libclamunrar7 \ && rm -rf /var/lib/apt/lists/* # initial update of av databases COPY dl_files.sh /dl_files.sh RUN chmod +x /dl_files.sh -RUN /dl_files.sh + +RUN set -ex; \ + \ + fetchDeps=' \ + curl \ + '; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + rm -rf /var/lib/apt/lists/*; \ + /dl_files.sh \ + apt-get purge -y --auto-remove $fetchDeps # permission juggling RUN mkdir /var/run/clamav && \