Git Product home page Git Product logo

Comments (3)

mko-x avatar mko-x commented on July 18, 2024

Huhu @nadar ,

thank you for your question.

First of all I recommend the usage of the official clam-av images provided here -> https://github.com/Cisco-Talos/clamav . I'm participating here and they provide a real good set of clamav-docker-images.

If I analyze your data, I see that clamav needs more RAM at the start of the scan, because:

  • clamav needs to check all stuff in the virus signatures database, so the memory is full of all that stuff - always and ever
  • after the check of primer stuff, the amount of comparable stuff in the RAM decreases
  • if there are new files to check against virus database - the load of RAM raises again, as clamav needs to load all virus definitions again

Do you get it?

At each new circle clamav needs to load all comparable data to RAM to be able to fast identify potential security reasons. They all need to be loaded upfront. After clamav has checked all data for 'example-risk' thread, it will remove that thread from RAM. it is not longer necessary for comparison - so RAM usage decreases.

from docker-clamav.

mko-x avatar mko-x commented on July 18, 2024

Short sum up:

clamav analyses all data for the moment with all singatures on each item provided to clamav.

RAM loads every possible threat we know.
clamav test every unit for all threats.
If all items are checked for one special threat, this threat disappears from the RAM - it has been checked.
Ram occupation decreases.

from docker-clamav.

nadar avatar nadar commented on July 18, 2024

better late then never: thank you for explaining, i guess i understood. I also wanted to switch to the clamav/clamav docker image but it seems they do not provided the option to set all variables via env, like your dockerimage does (which is amazing! because i don't have to build a custom image). Or did i miss something?

i currently have something like this:

- image: mkodockx/docker-clamav:alpine
    name: clamav
    port: 3310
    env:
      - name: "CLAMD_CONF_MaxFileSize"
        value: "256M"
      - name: "CLAMD_CONF_MaxScanSize"
        value: "256M"
      - name: "CLAMD_CONF_StreamMaxLength"
        value: "256M"
      - name: "CLAMD_CONF_ConcurrentDatabaseReload"
        value: "no"

So they thing you did with "CLAMD_CONF_ is amazing, or do you have quick hint how to achieve this task? I was looking at this guide (https://docs.clamav.net/manual/Installing/Docker.html) but could not find anything

from docker-clamav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.