Skip to content

Commit

Permalink
Set correct config directory when building clamav
Browse files Browse the repository at this point in the history
  • Loading branch information
samsimpson1 committed Jun 21, 2024
1 parent 5c6aea2 commit bb51d28
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN apt update && apt install -y \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="/usr/lib" \
-DAPP_CONFIG_DIRECTORY="/etc/clamav" \
-DAPP_CONFIG_DIRECTORY="/usr/local/etc" \
-DDATABASE_DIRECTORY="/var/lib/clamav" \
-DENABLE_CLAMONACC=OFF \
-DENABLE_EXAMPLES=OFF \
Expand All @@ -72,32 +72,6 @@ RUN apt update && apt install -y \
"/clamav/usr/include" \
"/clamav/usr/lib/pkgconfig/" \
&& \
sed -e "s|^\(Example\)|\# \1|" \
-e "s|.*\(PidFile\) .*|\1 /tmp/clamd.pid|" \
-e "s|.*\(LocalSocket\) .*|\1 /tmp/clamd.sock|" \
-e "s|.*\(TCPSocket\) .*|\1 3310|" \
-e "s|.*\(TCPAddr\) .*|#\1 0.0.0.0|" \
-e "s|.*\(User\) .*|\1 app|" \
-e "s|^\#\(LogFile\) .*|\1 /dev/stdout|" \
-e "s|^\#\(LogTime\).*|\1 yes|" \
"/clamav/etc/clamav/clamd.conf.sample" > "/clamav/etc/clamav/clamd.conf" && \
sed -e "s|^\(Example\)|\# \1|" \
-e "s|.*\(PidFile\) .*|\1 /tmp/freshclam.pid|" \
-e "s|.*\(DatabaseOwner\) .*|\1 app|" \
-e "s|^\#\(UpdateLogFile\) .*|\1 /dev/stdout|" \
-e "s|^\#\(NotifyClamd\).*|\1 /etc/clamav/clamd.conf|" \
-e "s|^\#\(ScriptedUpdates\).*|\1 yes|" \
"/clamav/etc/clamav/freshclam.conf.sample" > "/clamav/etc/clamav/freshclam.conf" && \
sed -e "s|^\(Example\)|\# \1|" \
-e "s|.*\(PidFile\) .*|\1 /tmp/clamav-milter.pid|" \
-e "s|.*\(MilterSocket\) .*|\1 inet:7357|" \
-e "s|.*\(User\) .*|\1 clamav|" \
-e "s|^\#\(LogFile\) .*|\1 /dev/stdout|" \
-e "s|^\#\(LogTime\).*|\1 yes|" \
-e "s|.*\(\ClamdSocket\) .*|\1 unix:/tmp/clamd.sock|" \
"/clamav/etc/clamav/clamav-milter.conf.sample" > "/clamav/etc/clamav/clamav-milter.conf" || \
exit 1 \
&& \
ctest -V

FROM --platform=$TARGETPLATFORM $builder_image AS app_builder
Expand Down

0 comments on commit bb51d28

Please sign in to comment.