# Use an official Python runtime as a parent image
FROM python:3.11-alpine
# Install system dependencies required for building Python packages
RUN apk add --no-cache build-base libffi-dev openssl-dev ca-certificates bash && update-ca-certificates
# Set the working directory
WORKDIR /app
# Install Python dependencies from requirements.txt
COPY requirements.txt ./
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application source code
COPY . .
# Build and install the package from source (setup.py)
RUN pip install --no-cache-dir .
# Expose the dirhunt console script
ENTRYPOINT ["dirhunt"]