All Projects → mko-x → Docker Clamav

mko-x / Docker Clamav

Licence: mit
Multi-arch dockerized open source antivirus for use with file sharing containers, REST API or TCP.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Clamav

mmb
Set of Dockerfiles and assets related to them for building Docker images with different services
Stars: ✭ 34 (-74.44%)
Mutual labels:  alpine, nextcloud
dockerimages
🐳 Some dockerfiles based on alpine
Stars: ✭ 27 (-79.7%)
Mutual labels:  alpine, nextcloud
Hrcloud2
A full-featured home hosted Cloud Drive, Personal Assistant, App Launcher, File Converter, Streamer, Share Tool & More!
Stars: ✭ 134 (+0.75%)
Mutual labels:  nextcloud, antivirus
Dockerfiles
Discontinued. Fork at your will.
Stars: ✭ 384 (+188.72%)
Mutual labels:  nextcloud, alpine
Alpine Mariadb
MariaDB running on Alpine Linux [Docker]
Stars: ✭ 117 (-12.03%)
Mutual labels:  alpine
Alphp
A micro PHP Docker environment based on an Alpine image. Can be used for container publishing, the completed image is only 30-40M
Stars: ✭ 100 (-24.81%)
Mutual labels:  alpine
Nextcloudpi
📦 Build code for NextcloudPi: Raspberry Pi, Odroid, Rock64, Docker, curl installer...
Stars: ✭ 1,340 (+907.52%)
Mutual labels:  nextcloud
Nextcloud Libreoffice Online
Docker configuration for Nextcloud with LibreOffice Online (plain http, no SSL support)
Stars: ✭ 92 (-30.83%)
Mutual labels:  nextcloud
Ergo Pe Av
🧠 🦠 An artificial neural network and API to detect Windows malware, based on Ergo and LIEF.
Stars: ✭ 130 (-2.26%)
Mutual labels:  antivirus
Veil Evasion
Veil Evasion is no longer supported, use Veil 3.0!
Stars: ✭ 1,678 (+1161.65%)
Mutual labels:  antivirus
Nextcloud Backup Restore
Moved to codeberg.org - https://codeberg.org/DecaTec/Nextcloud-Backup-Restore - Bash scripts for backup/restore of Nextcloud
Stars: ✭ 115 (-13.53%)
Mutual labels:  nextcloud
Vagrant Box Templates
Stars: ✭ 100 (-24.81%)
Mutual labels:  alpine
Ipxe Buildweb
iPXE Prebuilt binary web interface
Stars: ✭ 119 (-10.53%)
Mutual labels:  alpine
Team Container
A collection of containers to prepare a server for collaboration.
Stars: ✭ 100 (-24.81%)
Mutual labels:  nextcloud
Forms
📝 Simple form & survey app for Nextcloud
Stars: ✭ 127 (-4.51%)
Mutual labels:  nextcloud
Gocv Alpine
GoCV-compatible OpenCV 3.4 Alpine 3.7 Docker image
Stars: ✭ 95 (-28.57%)
Mutual labels:  alpine
Aria2 Ariang X Docker Compose
Docker compose files for Aria2+ AriaNg+ filerun/ Nextcloud/ h5ai + Plex. 图形化BT,磁力,离线下载,文件管理,播放,投屏
Stars: ✭ 1,581 (+1088.72%)
Mutual labels:  nextcloud
Php Malware Detector
PHP malware detector
Stars: ✭ 121 (-9.02%)
Mutual labels:  antivirus
Green Hat Suite
Green-hat-suite is a tool to generate meterpreter/shell which could evade antivirus.
Stars: ✭ 112 (-15.79%)
Mutual labels:  antivirus
Desktop
💻 Desktop sync client for Nextcloud
Stars: ✭ 1,787 (+1243.61%)
Mutual labels:  nextcloud

docker-clamav

ClamAV Logo

ClamAV latest.stable

Dockerized open source antivirus daemons for use with

ClamAV daemon as a Docker image. It builds with a current virus database and runs freshclam in the background constantly updating the virus signature database. clamd itself is listening on exposed port 3310.

Releases

Find the latest releases at the official docker hub registry. There are different releases for the different platforms.

Usage

The container run as user clamav with uid=101 and gid=102.

Debian (default, :latest, :buster-slim, :stretch-slim)

  • buster-slim
  • stretch-slim
    docker run -d -p 3310:3310 mkodockx/docker-clamav:buster-slim

Alpine (:alpine, :alpine-edge)

  • alpine
  • alpine-edge
    docker run -d -p 3310:3310 mkodockx/docker-clamav:alpine

Linked usage recommended, to not expose the port to "everyone".

    docker run -d --name av mkodockx/docker-clamav(:alpine)
    docker run -d --link av:av application-with-clamdscan-or-something

Environment VARs

Proxy

Thanks to @mchus proxy configuration is possible.

  • HTTPProxyServer: Allows to set a proxy server
  • HTTPProxyPort: Allows to set a proxy server port

Database Mirror

Specifying a particular mirror for freshclam is also possible.

  • DatabaseMirror: Hostname of the mirror web server.

Custom Configuration Files

Mount custom configuration files into the container.

  • FRESHCLAM_CONF_FILE: Path to custom freshclam.conf file, e.g. /mnt/freshclam.conf.
  • CLAMD_CONF_FILE: Set the path to a custom clamd.conf file, e.g. /mnt/clamd.conf.

Persistency

Virus update definitions are stored in /var/lib/clamav. To store the defintion just mount the directory as a volume, docker run -d -p 3310:3310 -v ./clamav:/var/lib/clamav mkodockx/docker-clamav:latest

docker-compose

See example with Nextcloud at docker-compose.yml. You still need to configure the AntiVirus files app in Nextcloud.

You can find a tutorial here: https://www.virtualconfusion.net/clamav-for-nextcloud-on-docker/

Healthcheck

The images provide with check.sh a file to check for the healthyness of the running container. To enable the health check configure your docker run or compose file. The start period should be adjusted to your system needs. Slow internet connection, with limited cpu and IO speed might require larger values.

Examples

Via docker run:

docker run --health-cmd=./check.sh \
            --health-start-period=120s \
            --health-interval=60s \
            --health-retries=3 \
            -p 3310:3310 mkodockx/docker-clamav:alpine`

Via docker-compose

  services:
    clamav:
      healthcheck:
        test: ["CMD", "./check.sh"]
        interval: 60s
        retries: 3
        start_period: 120s

Build multi-arch

This image provides support for different platforms

  • x86
  • amd64
  • arm32v7
  • arm64v8

Known Forks

FAQ

Memory?

Some users are wondering about memory consumption of clamd. Here is an explanation of the reasons I found:

"ClamAV holds the search strings using the classic string (Boyer Moore) and regular expression (Aho Corasick) algorithms. Being algorithms from the 1970s they are extemely memory efficient.

The problem is the huge number of virus signatures. This leads to the algorithms' datastructures growing quite large.

You can't send those datastructures to swap, as there are no parts of the algorithms' datastructures accessed less often than other parts. If you do force pages of them to swap disk, then they'll be referenced moments later and just swap straight back in. (Technically we say "the random access of the datastructure forces the entire datastructure to be in the process's working set of memory".)

The datastructures are needed if you are scanning from the command line or scanning from a daemon.

You can't use just a portion of the virus signatures, as you don't get to choose which viruses you will be sent, and thus can't tell which signatures you will need." Source stackexchange.com

It is obvious that an antivirus engine based on virus signatures will raise memory consumption over the time as it always has to check for all signatures. As the number of virus signatures grows daily, the amount of necessary memory will increase as well.

Error during DB update

Several users are experiencing problems during the database updates (incremental,diff,initial).

ClamaV is open source and the databases are provided by a network of mirrors that are hosted for free by some folks to support open source antivirus.

In the past I ran into these database update errors and spent hours of investigation, just to find it working the next hour or the other day. Please think about race conditions, proxy or network misconfiguration and update cycles within the clamav update mirrors - BEFORE(!) opening an issue here.

If you have an error related to the updates on your special OS, machine, iPad ;) or anything special else, first check the FAQ to clamav troubleshooting and then the virus database FAQ.

If you keep on getting errors you might try your own private local mirror easily.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].