From 77f40de5a9e993d6e7c7c1f07060d1164ee0a391 Mon Sep 17 00:00:00 2001 From: Pierre Jaury Date: Sat, 25 Jun 2016 12:28:01 +0200 Subject: [PATCH] Update clamav properly and initialize the database, related to #18 --- clamav/Dockerfile | 4 ++-- clamav/start.sh | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 clamav/start.sh diff --git a/clamav/Dockerfile b/clamav/Dockerfile index e2b41a91..eb7e9f2a 100644 --- a/clamav/Dockerfile +++ b/clamav/Dockerfile @@ -8,6 +8,6 @@ RUN apk add --update \ COPY conf /etc/clamav +COPY start.sh /start.sh - -CMD ["/usr/sbin/clamd"] +CMD ["/start.sh"] diff --git a/clamav/start.sh b/clamav/start.sh new file mode 100755 index 00000000..214230fd --- /dev/null +++ b/clamav/start.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Bootstrap the database if clamav is running for the first time +[ -f /data/main.cvd ] || freshclam + +# Run the update daemon +freshclam -d -c 6 + +# Run clamav +clamd