all-in-one/Containers/clamav/Dockerfile
Simon L 69e7de3cc0 adjust clamav dockerfile in order to run as non-root user
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-06-07 14:51:53 +02:00

18 lines
621 B
Docker

# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.1/alpine/Dockerfile
FROM clamav/clamav:1.1.0-1
COPY clamav.conf /tmp/clamav.conf
RUN set -ex; \
apk add --no-cache tzdata; \
cat /tmp/clamav.conf | tee -a /etc/clamav/clamd.conf; \
rm /tmp/clamav.conf; \
mkdir -p /var/run/clamav /run/lock; \
chown -R clamav:clamav /var/run/clamav /run/clamav /var/log/clamav /var/lock /run/lock; \
chmod 770 -R /var/run/clamav /run/clamav /var/log/clamav /var/lock /run/lock
VOLUME /var/lib/clamav
USER clamav
LABEL com.centurylinklabs.watchtower.monitor-only="true"