FROM python:3.11-slim WORKDIR /app # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application files COPY . . # Create mount point for AWS credentials and data directory RUN mkdir -p /config /app/data EXPOSE 5000 # HOME=/config means Path.home() resolves to /config at runtime. # Mount your AWS credentials to /config/.aws at runtime — nothing sensitive is baked in. ENV FLASK_APP=app.py \ PYTHONUNBUFFERED=1 \ DEBUG=false \ HOME=/config CMD ["python", "app.py"]