FROM python:3.10-slim-buster WORKDIR /app # Install build dependencies if necessary (only if other solutions fail) RUN apt-get update && apt-get install -y build-essential libpq-dev \ && rm -rf /var/lib/apt/lists/* # ... rest of your Dockerfile