mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-23 22:21:45 +08:00
Merge pull request #2701 from nextcloud/enh/2689/run-clamav-non-root
adjust clamav dockerfile in order to run as non-root user
This commit is contained in:
commit
3c105d5683
1 changed files with 7 additions and 2 deletions
|
@ -6,8 +6,13 @@ COPY clamav.conf /tmp/clamav.conf
|
||||||
RUN set -ex; \
|
RUN set -ex; \
|
||||||
apk add --no-cache tzdata; \
|
apk add --no-cache tzdata; \
|
||||||
cat /tmp/clamav.conf | tee -a /etc/clamav/clamd.conf; \
|
cat /tmp/clamav.conf | tee -a /etc/clamav/clamd.conf; \
|
||||||
rm /tmp/clamav.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
|
||||||
|
|
||||||
# USER root is probably used
|
VOLUME /var/lib/clamav
|
||||||
|
|
||||||
|
USER clamav
|
||||||
|
|
||||||
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|
||||||
|
|
Loading…
Reference in a new issue