sqlmapproject-sqlmap
SUCCESS
7m 10s
History Source
SummaryIterations1Transcript12Dockerfile
Dockerfile29 lines · 761 chars
FROM python:3.11-alpine

WORKDIR /workspace

# Copy the project source
COPY . /workspace

# Install system dependencies for building Python packages and tests
RUN apk add --no-cache build-base

# Install testing tooling
RUN pip install --no-cache-dir pytest

# Install optional Python dependencies if a requirements file exists
RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi

# Pre-compile Python sources to catch syntax errors
RUN python -m py_compile sqlmap.py

# Copy smoke test script and make it executable
COPY smoke.sh /workspace/smoke.sh
RUN chmod +x /workspace/smoke.sh

# Run smoke tests during build to validate the container image
RUN ./smoke.sh

# Default command to run the CLI
CMD ["python", "sqlmap.py"]