File size: 459 Bytes
98be01a c46f2d6 2706a7d c46f2d6 2706a7d c46f2d6 98be01a 2706a7d 98be01a 2706a7d 98be01a c46f2d6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
FROM python:3.11-slim
# Install ZMap and dependencies
RUN apt-get update && apt-get install -y \
zmap \
sudo \
&& rm -rf /var/lib/apt/lists/*
# Allow ZMap to run without password
RUN echo "www-data ALL=(ALL) NOPASSWD: /usr/bin/zmap" >> /etc/sudoers
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
USER www-data
EXPOSE 5000
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "1", "app:app"] |