clamAV deamon, pattern update, REST endpoint with single container. inspired by https://github.com/uktrade/dit-clamav-rest
docker build -t <yourtag> .
docker run -v <your volume>:/var/lib/clamav -e "AUTH_USER=user" -e "AUTH_PASSWORD=password" -p 8080:8080 <yourtag>
then, test by curl.
curl -X POST -u user:password -F "[email protected]" http://localhost:8080/scan
OK response is below.
{
"reason": null,
"time": 2.8135181999532506,
"valid": true
}
NG response example is below.
{
"reason": "Eicar-Test-Signature",
"time": 0.003237200027797371,
"valid": false
}
I recomend to mount /var/lib/clamav
directory as volume because ClamAV pattern files save at /var/lib/clamav
.
- AUTH_USER - user name for basic auth
- AUTH_PASSWORD - user password for basic auth
output to stdout.
refleshclam command run at 0:00 UTC and 12:00 UTC . clamd check update every 4 hours.
If you want to change update term, change crontab and clamd.conf.