model-scan-3 / Dockerfile
pengdaqian
change
78f8a0c
raw
history blame
477 Bytes
FROM clamav/clamav:stable
RUN apk update && apk add --no-cache \
python3 \
py3-pip \
&& rm -rf /var/cache/apk/*
RUN mkdir -p /run/clamav
RUN chmod -R 777 /run/clamav
RUN adduser --disabled-password --uid 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY requirements.txt requirements.txt
RUN pip3 install --no-cache-dir -r requirements.txt
COPY . .
CMD ["sh", "-c", "clamd restart && python3 scan_main.py"]