mirror of
https://github.com/opencloud-eu/container-clamav-icap.git
synced 2026-11-16 22:53:53 +00:00
Container for ClamAV via ICAP
- Dockerfile 66.4%
- Shell 33.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .woodpecker | ||
| etc/c-icap | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
ClamAV + c-icap Docker Container
This container provides a lightweight Debian-based image that runs ClamAV integrated with c-icap for virus scanning over ICAP. It's suitable for use with proxies (like Squid) that support ICAP for content filtering.
🧰 Features
- Based on
debian:bookworm-slim - Installs:
clamavclamav-daemonc-icaplibicapapi-devlibc-icap-mod-virus-scan
- Fresh virus definitions via
freshclamat build time - Handles headless install issues (debconf, service start)
- Proper permissions for ClamAV and c-icap runtime
- Simple
entrypoint.shfor container initialization - The versioning follows the ClamAV version used in the base image
🔍 Service Details
The container exposes two ICAP services on port 1344:
avscan- Main antivirus scanning servicesrv_clamav- Legacy service name (maintained for backward compatibility)
🚀 Usage
Once the container is running, you can access the ICAP services at:
icap://localhost:1344/avscanicap://localhost:1344/srv_clamav
⚙️ Configuration Options
Environment Variables
Following variables are available:
- FRESHCLAM_DISABLE - Disable Freshclam
- FRESHCLAM_DATABASEMIRROR - The mirrorserver for freshcalm to be used. Multible server are supported, they need to be sperated by space
- FRESHCLAM_ARGS - Args passed to Freshclam
- CLAMD_DISABLE - Disable Clamd
- CLAMD_ARGS - Args passed to Clamd
- C_ICAP_DISABLE - Disable c-icap
- C_ICAP_ARGS - Args passed to c-icap
🔌 Port Mapping
By default, the c-icap service runs on port 1344, the clamav is also available at port 3310. To use a different port:
docker run -d \
--name clamav-icap \
-p 8080:1344 \
opencloudeu/clamav-icap
🛠 Build
docker build -t clamav-c-icap .