FROM python:3.11-alpine
# Install build dependencies for Python packages with C extensions (optional for some deps)
RUN apk add --no-cache --virtual .build-deps build-base libffi-dev openssl-dev
# Set working directory for the build and runtime
WORKDIR /app
# Copy repository contents
COPY . .
# Pre-compile Python modules for faster startup (optional optimization)
RUN python -m compileall -q .
# Make smoke test script executable (used by VerifyBuild smoke test)
RUN chmod +x smoke.sh
# Do not install from source via pip; rely on the repository's local modules
ENV PYTHONUNBUFFERED=1
# Use sqlmap as the container entry point
ENTRYPOINT ["python", "sqlmap.py"]