# Use an official Python runtime as a parent image FROM python:3.12-slim # Set the working directory in the container WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ gosu \ redis-server \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Copy requirements file COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Create necessary directories RUN mkdir -p downloads config creds # Make entrypoint script executable RUN chmod +x entrypoint.sh # Set entrypoint to our script ENTRYPOINT ["/app/entrypoint.sh"] # Default command (empty as entrypoint will handle the default behavior) CMD []