-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1362] Fixed Clamav to be rootless.
- Loading branch information
1 parent
a2e1144
commit 04dbcae
Showing
9 changed files
with
93 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ClamAV container. | ||
# | ||
# @see https://hub.docker.com/r/clamav/clamav/tags | ||
# | ||
# Allow running ClamAV in rootless mode. | ||
# @see https://github.com/Cisco-Talos/clamav/issues/478 | ||
# | ||
# hadolint global ignore=DL3018 | ||
# | ||
# @see https://hub.docker.com/r/uselagoon/commons/tags | ||
# @see https://github.com/uselagoon/lagoon-images/tree/main/images/commons | ||
FROM uselagoon/commons:24.7.0 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 | ||
|
||
COPY .docker/config/clamav/clamav.conf /tmp/clamav.conf | ||
|
||
RUN cat /tmp/clamav.conf >> /etc/clamav/clamd.conf && rm /tmp/clamav.conf && \ | ||
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 | ||
|
||
USER clamav | ||
|
||
ENTRYPOINT [ "/init-unprivileged" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
MaxDirectoryRecursion 30 | ||
MaxFileSize 100M | ||
PCREMaxFileSize 100M | ||
StreamMaxLength 100M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04dbcae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Deployed on https://66c309594e548983968cee0c--drevops-scaffold-docs.netlify.app