Spaces:
Sleeping
Sleeping
File size: 1,339 Bytes
cb34746 cba4ee0 78f8a0c 0d1630d 7c12248 78f8a0c c2a55f1 af28c56 f28d0bd b724d26 f28d0bd b724d26 c2a55f1 92afeb2 3f537e7 01fb141 4edc435 431e891 4edc435 cb34746 4edc435 cb34746 452d527 b16c492 cb34746 3528c05 e246446 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
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 mkdir -p /var/lib/clamav
RUN chmod -R 777 /var/lib/clamav
RUN mkdir -p /var/log/clamav
RUN chmod -R 777 /var/log/clamav
RUN adduser --disabled-password --uid 1000 user
RUN sed -i 's/User clamav/User user/g' /etc/clamav/clamav-milter.conf
RUN cat /etc/clamav/clamav-milter.conf
RUN sed -i 's/User clamav/User user/g' /etc/clamav/clamd.conf
RUN cat /etc/clamav/clamd.conf
RUN chown user:user /var/lib/clamav/bytecode.cvd
RUN chown user:user /var/lib/clamav/daily.cvd
RUN chown user:user /var/lib/clamav/daily.cvd
RUN chown user:user /var/lib/clamav/main.cvd
RUN chown user:user /var/lib/clamav
RUN ls -lha /var/lib/clamav
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN chown user:user /var/lib/clamav/bytecode.cvd
RUN chown user:user /var/lib/clamav/daily.cvd
RUN chown user:user /var/lib/clamav/daily.cvd
RUN chown user:user /var/lib/clamav/main.cvd
RUN chown user:user /var/lib/clamav
WORKDIR $HOME/app
COPY requirements.txt requirements.txt
RUN pip3 install --no-cache-dir -r requirements.txt
COPY --chown=user init /init
RUN chmod +x /init
COPY . .
EXPOSE 7860
CMD ["sh", "-c", "clamd restart && python3 scan_main.py"] |