diff --git a/titan/Dockerfile b/titan/Dockerfile index 2ac5683b3..1336a8710 100644 --- a/titan/Dockerfile +++ b/titan/Dockerfile @@ -10,7 +10,7 @@ COPY . . RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /titan -ldflags="-s -w" ./cmd/titan/main.go -FROM clamav/clamav:0.105.1_base +FROM clamav/clamav:1.0_base ENV APP_HOME /app WORKDIR $APP_HOME diff --git a/titan/bootstrap.sh b/titan/bootstrap.sh index 9c2668bc0..5512dfc36 100755 --- a/titan/bootstrap.sh +++ b/titan/bootstrap.sh @@ -10,8 +10,10 @@ sed -i 's/\/tmp\/clamd\.sock/\/run\/clamav\/clamd\.sock/' /etc/clamav/clamd.conf # We need to start the clamd daemon, and conveniently the image provides an init script # to do this. Less conveniently, that init script also ends with a blocking command to # "wait forever". So, let's drop that command and run everything else... +# The new ClamAV 1.0 image uses 'exec tail -f "/dev/null"' at the end. Also, the script +# uses tini in the shebang, so we need to change it to /bin/sh when piping. -grep -v 'tail -f "/dev/null"' /init | sh +sed -e 's|^#!/sbin/tini /bin/sh|#!/bin/sh|' -e '/exec tail -f.*\/dev\/null/d' -e '/tail -f.*\/dev\/null/d' /init | sh # Mischief managed. I am a terrible person. # Run the Titan server process.