Skip to content

Commit

Permalink
Add clamav-daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhamiltonstubber committed Jan 17, 2024
1 parent 93df436 commit 1bc9b31
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion tc_av/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM clamav/clamav:latest
# Install python/pip
ENV PYTHONUNBUFFERED=1
RUN apk add python3 py3-pip gcc musl-dev
RUN apk add clamav-daemon
RUN pip install --no-cache --upgrade --break-system-packages pip setuptools

add requirements.txt /home/root/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion tc_av/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def check_document(data: DocumentRequest):
s3_client.download_file(Bucket=data.bucket, Key=data.key, Filename=file_path)

if settings.live:
cmd = f'clamdscan --config-file=clamav/clamd.conf {file_path}'
cmd = f'clamdscan {file_path}'
else:
cmd = f'clamdscan --fdpass {file_path}'
output = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE).stdout.decode()
Expand Down

0 comments on commit 1bc9b31

Please sign in to comment.