# Use Python 3.11 slim image (supports amd64, arm64, arm/v7) FROM python:3.11-slim # Set working directory WORKDIR /app # Copy requirements and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY *.py ./ COPY unifi.conf ./ # Create logs directory RUN mkdir -p /app/logs # Set environment variables ENV PYTHONUNBUFFERED=1 # Default command (can be overridden) CMD ["python", "main.py"]