all-in-one/Containers/clamav/Dockerfile
Zoey 9e95d96656
Merge pull request #6094 from nextcloud/clamav-alpine-aarch64
clamav: build the container also for aarch64/arm64 by using the alpine package
2025-03-06 16:00:53 +01:00

25 lines
1.1 KiB
Docker

# syntax=docker/dockerfile:latest
FROM alpine:3.21.3
RUN set -ex; \
apk upgrade --no-cache -a; \
apk add --no-cache tzdata clamav supervisord; \
mkdir /run/clamav; \
chmod 777 -R /run/clamav /var/log/clamav /var/log/supervisord /var/run/supervisord; \
sed -i "s|#\?MaxDirectoryRecursion.*|MaxDirectoryRecursion 30|g" /etc/clamav/clamd.conf; \
sed -i "s|#\?MaxFileSize.*|MaxFileSize 2G|g" /etc/clamav/clamd.conf; \
sed -i "s|#\?PCREMaxFileSize.*|PCREMaxFileSize aio-placeholder|g" /etc/clamav/clamd.conf; \
sed -i "s|#\?StreamMaxLength.*|StreamMaxLength aio-placeholder|g" /etc/clamav/clamd.conf; \
sed -i "s|#\?TCPSocket|TCPSocket|g" /etc/clamav/clamd.conf; \
freshclam --foreground --stdout
COPY --chmod=775 start.sh /start.sh
COPY --chmod=775 healthcheck.sh /healthcheck.sh
COPY --chmod=664 supervisord.conf /supervisord.conf
USER 100
VOLUME /var/lib/clamav
ENTRYPOINT ["/start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
LABEL com.centurylinklabs.watchtower.enable="false"
HEALTHCHECK --start-period=60s --retries=9 CMD /healthcheck.sh