FROM python:3.12-slim # Install system dependencies RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ python3-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Create and set working directory WORKDIR /app # Install Python packages RUN pip install --no-cache-dir \ apache-airflow==2.7.3 \ pymongo==4.6.1 \ graypy==2.1.0 \ openai==1.12.0 \ requests==2.31.0 # Create a non-root user RUN useradd -m airflow USER airflow # Keep container running CMD ["sleep", "infinity"]