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

Calling dockerized clamd clamdscan from another container #195

Open
groods-ehg opened this issue Dec 11, 2024 · 1 comment
Open

Calling dockerized clamd clamdscan from another container #195

groods-ehg opened this issue Dec 11, 2024 · 1 comment

Comments

@groods-ehg
Copy link

I require a pattern to deploy clam in a container initially for AWS ECS (Elastic Container Service) but need a solution that can replicate the same pattern for x (> 500) dedicated hosts running docker locally. The goal being to have a single solution for both to minimize code branching. Can someone please offer a pattern where x other containers (ATM this would be limited to a single container in each ECS cluster [same with dedicated host] but in future may include other micro-service containers) can call clamdscan from a central clam based container. The cludgy method after a couple of hours of research is via socket either via common volume mount (really bad) or via private docker network (much better) but need to know if this is the preferred best practices approach and if so how to stitch it together i.e. what to expose from the clam container and how to consume the clamdscan service from other containers. The clam doco is really good but fails how to achieve this.
refer: https://docs.clamav.net/manual/Usage/Scanning.html#clamdscan

Any assistance in this matter would be greatly appreciated. Orchestration will be varied between AWS taskDefs for ECS clusters and compose for on-prem so don't require details for orchestration just best practices and methods for exposing and consuming clamdscan in a clam container from other containers.

Any assistance in this matter is greatly appreciated.

@groods-ehg
Copy link
Author

groods-ehg commented Dec 11, 2024

Crap!!!!! @mko-x sorry just realised I published this directly in your space. Been a long week already and thought I was in stackoverflow not GH. Apologise for the mistake but if you could point me in a direction that would be awesome. Again apologies for the direct post not associated to a repo.

More info as I think this pattern would be appreciated by others:
An application container needs to scan uploaded files for vulnerability patterns, however due to memory limitations it's not feasible to use clamscan on each file in the application container due to the pattern db requirement for each scan. Current application deploys and leverages clamd in container but is triggering the OOMKiller when the container violates it's memory allowment. The preferred approach is to offload scanning requirements to clamdscan running in a separate clamd container so I am after a pattern that would facilitate this. Application implementation is not required, can deal with that, it's the pattern to expose and consume clamdscan that I require.

Again any assistance is greatly appreciated.

Kind regards
Greg

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

1 participant