nekmo-dirhunt
SUCCESS
6m 21s
History Source
SummaryIterations1Transcript6Dockerfile
Dockerfile30 lines · 708 chars
FROM python:3.11-slim

# Improve Python behavior in container
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends build-essential \
    && rm -rf /var/lib/apt/lists/*

# Create a non-root user for running the application
RUN useradd -m -s /bin/bash dirhunt

WORKDIR /opt/dirhunt

# Copy source
COPY . /opt/dirhunt/

# Install dependencies and package from source
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
    && pip install --no-cache-dir -e .

# Switch to non-root user for security
USER dirhunt

# Default behavior: show help when no args are provided
ENTRYPOINT ["dirhunt"]
CMD ["--help"]