FROM python:3.9-slim # Install system dependencies for mysqlclient RUN apt-get update && apt-get install -y \ pkg-config \ default-libmysqlclient-dev \ build-essential \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt COPY . /app/ # We'll run the server via docker-compose command, but this is a default CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]