Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for changing clamd settings without volume mounting full config #27

Open
sopelt opened this issue Oct 5, 2023 · 3 comments
Open
Assignees

Comments

@sopelt
Copy link

sopelt commented Oct 5, 2023

Hi, thanks for providing an official docker image. Before that was available we looked at third party clamav docker images and were quite happy with the concept of having multiple environment variables that allowed changing setting (e.g. scan time/size limits etc.) just by changing a container environment variable. This allows for stateless deployment/operation (no volume mount for /etc/clam...).
Has there ever been demand for/discussion about such a change?
As far as I understand clamd uses clamd.conf as its exclusive source for options meaning the environment variables would have to be injected (e.g. via sed) in the entrypoint before starting clamd.
If you would be open to such an inclusion I could provide a draft PR/work on that.

@micahsnyder
Copy link
Collaborator

I believe there was a request a while back to add environment variables for every possible clamd configuration. Though to be honest I'm having trouble finding it.
It sounds like a convenient feature, but a lot of work.

Sort of related, there was this PR for clamav to make sure there are command line options for every config option: Cisco-Talos/clamav#841 I just now realized the author added commits after my initial review. I will have to go re-review it. I don't think it solves the same problem though.

@Loki-Afro
Copy link

Loki-Afro commented Jan 3, 2024

with https://github.com/mko-x/docker-clamav you can do that without specifying each env var, although this has not been documented

you can supply the env CLAMD_CONF_StreamMaxLength=3000M and it will be appended to the clamd config

see here

https://github.com/mko-x/docker-clamav/blob/136fd83e5a7bad2e63fc87497be45d11eb838e94/debian/buster/envconfig.sh#L17-L23

@micahsnyder would that be an option to implement this?

@rsundriyal rsundriyal self-assigned this Feb 2, 2024
@micahsnyder
Copy link
Collaborator

@mko-x I am interested in copying your solution to specify each config option with an environment variable. Have you run into any issues with your implementation. Are you comfortable with us copypasting this code into the clamav and clamav-debian containers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants