Skip to content

Commit

Permalink
Change port
Browse files Browse the repository at this point in the history
  • Loading branch information
asteel-gsa committed Nov 21, 2024
1 parent cdec200 commit 4d9efee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ RUN freshclam --quiet --no-dns

COPY entrypoint.sh /usr/bin/

RUN mkdir /clamav \
&& chown -R clamav.clamav /clamav \
&& chown -R clamav.clamav /var/log/clamav \
&& chown -R clamav.clamav /run/clamav

ENV PORT=9000
ENV SSL_PORT=9443

Expand All @@ -63,4 +68,6 @@ ENV PCRE_MATCHLIMIT=100000
ENV PCRE_RECMATCHLIMIT=2000
ENV SIGNATURE_CHECKS=2

USER clamav

ENTRYPOINT [ "entrypoint.sh" ]
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ mkdir -p /clamav/etc
mkdir -p /clamav/data
mkdir -p /clamav/tmp
cp /etc/clamav/* /clamav/etc/
chown -R clamav /clamav/data
chown -R clamav /clamav/tmp
chown -R clamav.clamav /var/log/clamav
chmod 0700 /clamav/etc/freshclam.conf
# chown -R clamav /clamav/data
# chown -R clamav /clamav/tmp
# chown -R clamav.clamav /var/log/clamav
# chmod 0700 /clamav/etc/freshclam.conf

# Replace values in freshclam.conf
sed -i 's/^#\?NotifyClamd .*$/NotifyClamd \/clamav\/etc\/clamd.conf/g' /clamav/etc/freshclam.conf
Expand Down Expand Up @@ -64,7 +64,7 @@ fi
# So only if a newer database version is available clamd will be notified next time, and this can take hours/days.
# Remarks: The socket port is configured in the .Dockerfile itself.
sleep 120s
echo "RELOAD" | nc 127.0.0.1 3310 &
echo "RELOAD" | nc 127.0.0.1 61443 &
) 2>&1 | tee -a /var/log/clamav/clamav.log


Expand Down

0 comments on commit 4d9efee

Please sign in to comment.