FROM python:3.11-slim

# Install ADB and system dependencies
RUN apt-get update && apt-get install -y \
    android-tools-adb \
    nano \
    curl \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy source code
COPY . .

# Environment setup
ENV PYTHONUNBUFFERED=1

# The default command will be overridden in docker-compose, but we can set a fallback
CMD ["python", "run.py", "--config", "test_config.yml"]
