1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-08-10 22:31:47 +02:00
2982: Switch to upstream's clamav image r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Switch to upstream's clamav image. The only downside is that it doesn't support armv7... but odds are it won't have enough RAM anyway.

Why do we want this?
- faster build times
- will be easier to upgrade
- less maintenance required for us
- it may fix the CI tests failing because of clamav/EICAR not getting caught
- it will save bandwidth (as we won't re-download the definitions from fresh: they are in the base image)
- it puts clamav on its own network (security)

### Related issue(s)
- close #2059

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
bors[bot]
2023-10-17 09:41:49 +00:00
committed by GitHub
11 changed files with 47 additions and 169 deletions

View File

@@ -143,7 +143,7 @@ services:
tag: mailu-oletools
restart: always
networks:
- noinet
- oletools
depends_on:
{% if resolver_enabled %}
- resolver
@@ -186,10 +186,13 @@ services:
driver: journald
options:
tag: mailu-antispam
{% if oletools_enabled %}
networks:
- default
- noinet
{% if oletools_enabled %}
- oletools
{% endif %}
{% if antivirus_enabled %}
- clamav
{% endif %}
volumes:
- "{{ root }}/filter:/var/lib/rspamd"
@@ -212,17 +215,22 @@ services:
# Optional services
{% if antivirus_enabled %}
antivirus:
image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}clamav:${MAILU_VERSION:-{{ version }}}
image: clamav/clamav-debian:1.2.0-6
restart: always
env_file: {{ env }}
logging:
driver: journald
options:
tag: mailu-clamav
networks:
- clamav
volumes:
- "{{ root }}/filter:/data"
{% if resolver_enabled %}
depends_on:
- resolver
dns:
- {{ dns }}
{% endif %}
- "{{ root }}/filter/clamav:/var/lib/clamav"
healthcheck:
test: ["CMD-SHELL", "kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid`"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
{% endif %}
{% if webdav_enabled %}
@@ -289,8 +297,12 @@ networks:
webmail:
driver: bridge
{% endif %}
{% if antivirus_enabled %}
clamav:
driver: bridge
{% endif %}
{% if oletools_enabled %}
noinet:
oletools:
driver: bridge
internal: true
{% endif %}