Dockerfile36 lines · 948 chars FROM python:3.11-bookworm
# Basic environment setup for building and running sqlmap from source
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
LANG=C.UTF-8
# Working directory inside the container
WORKDIR /app
# Install system dependencies required to build some bundled third-party libraries
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates \
build-essential \
libssl-dev \
libffi-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy the repository contents into the image
COPY . .
# (Optional) Pre-compile Python sources to speed up startup
RUN python3 -m compileall -q .
# Ensure Python can find the project modules
ENV PYTHONPATH=/app:$PYTHONPATH
# Default command: display help for sqlmap when container starts without args
ENTRYPOINT ["python3", "sqlmap.py"]
CMD ["--help"]