Self updating dockerized antivirus based on clam-av.
100M+

Dockerized open source antivirus daemons for use with
3310ClamAV daemon as a Docker image. It builds with a current virus database and
runs freshclam in the background constantly updating the virus signature database. clamd itself
is listening on exposed port 3310.
Find the latest releases at the official docker hub registry. There are different releases for the different platforms.
The container run as user clamav with uid=101 and gid=102.
docker run -d -p 3310:3310 mkodockx/docker-clamav:buster-slim
docker run -d -p 3310:3310 mkodockx/docker-clamav:alpine
Linked usage recommended, to not expose the port to "everyone".
docker run -d --name av mkodockx/docker-clamav(:alpine)
docker run -d --link av:av application-with-clamdscan-or-something
Thanks to @mchus proxy configuration is possible.
Specifying a particular mirror for freshclam is also possible.
Mount custom configuration files into the container.
freshclam.conf file, e.g. /mnt/freshclam.conf.clamd.conf file, e.g. /mnt/clamd.conf.Virus update definitions are stored in /var/lib/clamav. To store the defintion just mount the directory as a volume, docker run -d -p 3310:3310 -v ./clamav:/var/lib/clamav mkodockx/docker-clamav:latest
See example with Nextcloud at docker-compose.yml. You still need to configure the AntiVirus files app in Nextcloud.
You can find a tutorial here: https://www.virtualconfusion.net/clamav-for-nextcloud-on-docker/
The images provide with check.sh a file to check for the healthyness of the running container. To enable the health check configure your docker run or compose file. The start period should be adjusted to your system needs. Slow internet connection, with limited cpu and IO speed might require larger values.
Via docker run:
docker run --health-cmd=./check.sh \
--health-start-period=120s \
--health-interval=60s \
--health-retries=3 \
-p 3310:3310 mkodockx/docker-clamav:alpine`
Via docker-compose
services:
clamav:
healthcheck:
test: ["CMD", "./check.sh"]
interval: 60s
retries: 3
start_period: 120s
This image provides support for different platforms
Content type
Image
Digest
sha256:9642d2039…
Size
46.4 MB
Last updated
over 3 years ago
docker pull mkodockx/docker-clamav:buster