clamav
clamav copied to clipboard
Feature request: Configuration via environment variables for docker
Dear clamav team,
how about the idea making the configuration of clamd and clam possible via environment variables in the docker image?
Thanks for your help.
Hey team, it would be nice if you could implement environment variables in the docker image
It would be a great addition in the direction of more cloud compliance.
Creating mount point via docker and updating configuration file can be done but add complexity. Firt run can be more complicated (run, edit file, restart); "docker run" | "compose up" is not sufficient and you've got to manage filesystem and ACL. For automatisation you've have to déploy clavamv container and configuration file. Rebase image can be done but for security and confidance it's better to keep with base image.
With environment variables, clamav container can live standalone, you can confgure it for exemple in a PaaS environnement via simple variables.
Personnaly i'am first interested in StreamMaxLength, as this limit may vary beetwen Clamav instances. A more general approch with all variables supported by Clamd and Fresclam would would be great, for exemple in he same way this is done by mko-x docker image : https://github.com/mko-x/docker-clamav/blob/master/alpine/main/envconfig.sh
My usecase is also StreamMaxLength by the way. I had to create a new image.
Hello clamav team ;)
What's your opinion about this request ? Can we do something to help ?
Kind regards
Hello clamav team ;)
What's your opinion about this request ? Can we do something to help ?
Kind regards
This is very interesting. I'm not opposed. We'll talk about it after the release. If we can do it entirely from within Dockerfile scripts rather than having to make changes to clamd
, that would be ideal.
I can't promise our team will work on this any time soon.
@micahsnyder I just found this issue, in the meantime, it would be great if the documentation clearly said it is not supported. Because I just spent an hour searching the internet and found contradictory information. Though they mainly come from 3rd party projects, e.g. https://github.com/tiredofit/docker-clamav/tree/main#environment-variables
I can use AWS EFS to attach a volume to the Fargate container with the config file. The question is, can I do the same for clam_db
? Are there any limits or anything I should know if the volume is a network mount? Though EFS is reasonably fast most of the time for the scale of our solutions.
Thank you
it would be great if the documentation clearly said it is not supported. Because I just spent an hour searching the internet and found contradictory information.
@1oglop1 I don't think it's reasonable for us to document features that don't exist. That's a precedent I don't care to set. It is interesting to see there is a third party docker container with this feature though.
I can use AWS EFS to attach a volume to the Fargate container with the config file. The question is, can I do the same for clam_db?
Yes, you can do this. Here is an example with plain docker, overriding the /etc/clamav
directory: https://docs.clamav.net/manual/Installing/Docker.html#controlling-the-container