sqlmapproject-sqlmap
SUCCESS
2m 38s
History Source
SummaryIterations1Transcript3Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile705 bytes written
text27 lines · 705 chars
FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1

# Install essential build tools and libraries (best-effort for various Python deps)
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    libxml2-dev \
    libxslt1-dev \
    libffi-dev \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/sqlmap

# Copy the repository contents
COPY . .

# Upgrade pip and install optional requirements if present
RUN python -m pip install --upgrade pip
RUN if [ -f requirements.txt ]; then python -m pip install --no-cache-dir -r requirements.txt; fi

# Ensure the main script is executable
RUN chmod +x sqlmap.py

# Default command: run the smoke test
CMD ["python","sqlmap.py","--smoke"]
WRITEWriteFile· step #2
0s
.dockerignore134 bytes written
dockerignore16 lines · 134 chars
__pycache__/
*.pyc
*.pyo
*.pyd
build/
dist/
*.egg-info/
*.egg-info
.eggs/
*.log
**/__pycache__/
vendor/
node_modules/
.DS_Store
.git/
VERIFYVerifyBuild· step #3
1m 16s
VerifyBuildaccepted
Concerns: COPY . . may copy unnecessary files into the image; consider adding a .dockerignore to reduce context size and image layers, If requirements.txt is large or missing, dependency installation might fail or produce inconsistent environments; ensure requirements are properly pinned and optional dependencies are handled, The smoke test relies on sqlmap.py having a --smoke flag and being executable; ensure compatibility across environments
Smoke [PASS]: test -x /opt/sqlmap/sqlmap.py
Smoke [PASS]: python --version
Smoke [PASS]: python sqlmap.py --smoke