Skip to content

Commit

Permalink
build: add clamav
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Aug 19, 2024
1 parent e5a7b2c commit cfef92a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions clamav.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM uselagoon/commons as commons

FROM clamav/clamav:1.4.0

COPY --from=commons /lagoon /lagoon
COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/

RUN apk add --no-cache tzdata

RUN sed -i "s/^LogFile /# LogFile /g" /etc/clamav/clamd.conf && \
sed -i "s/^#LogSyslog /LogSyslog /g" /etc/clamav/clamd.conf && \
sed -i "s/^UpdateLogFile /# UpdateLogFile /g" /etc/clamav/freshclam.conf && \
sed -i "s/^#LogSyslog /LogSyslog /g" /etc/clamav/freshclam.conf

USER root

RUN fix-permissions /var/lib/clamav

ENTRYPOINT [ "/init-unprivileged" ]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,15 @@ services:
command:
- solr-precreate
- mycore

clamav:
build:
context: .
dockerfile: clamav.Dockerfile
user: "10000"
ports:
- "3310" # Find port on host with `docker-compose port clamav 3310`.
labels:
lagoon.type: basic
lagoon.service.port: 3310
lagoon.autogeneratedroute: false

0 comments on commit cfef92a

Please sign in to comment.