简体   繁体   中英

How to set max_filesize for clamav in docker-compose.yml

I'm trying to setup a docker container with clamav and am struggling to allow for larger files to be scanned. I've set up my docker-compose.yml like this:

version: "3.3"
services:
  clamav:
    image: clamav/clamav:latest
    environment:
      CLAMD_CONF_MaxFileSize: 250M
      CLAMD_CONF_MaxScanSize: 250M
    restart: always
    ports:
      - "3310:3310"

but that doesn't seem to do it (I keep getting a Broken Pipe Error). I presume I'm just using the wrong variables, but I can't seem to find the right ones.

Can anyone point me in the right direction?

According to my information this is not possible in the official image of clamav/clamav:stable but it would be a great improvement of the image. We also wanted to use the official image. So our solution has been to mount the /var/lib/clamav directory and the /etc/clamav directories to a persistent volume. Then we change the /etc/clamav/clamd.conf after running the container and restart it after the configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM