scanfile/scanners/capa/Dockerfile

24 lines
639 B
Docker

FROM python:3-alpine
# Set environment variables (these can be overridden in `docker-compose.yml` or `docker run`)
ENV FILE_DIRECTORY="/mnt/storage/files/"
ENV HOST="127.0.0.1"
ENV PORT="5001"
ENV DEBUG="True"
ENV WORKERS="4"
# Expose the port Flask will run on
EXPOSE 5000
WORKDIR /opt/capa
COPY . .
RUN apk --no-cache add wget unzip
RUN pip install --no-cache --upgrade pip
RUN pip install --no-cache -r requirements.txt
RUN wget https://github.com/mandiant/capa-rules/archive/refs/tags/v4.0.0.zip
RUN unzip v4.0.0.zip
# Start the Flask app
#CMD ["python", "app.py"]
CMD ["sh", "-c", "gunicorn -w $WORKERS -b $HOST:$PORT app:app"]