# Airflow-worker-friendly image for predictive-classification x airflow.
# Extends the official Airflow 2.9 image so the DAG runs unmodified inside a
# scheduler/worker deployment. mca-sdk plus sklearn are added on top.

FROM apache/airflow:2.9.3-python3.11

COPY requirements.txt /requirements.txt
RUN pip install --no-cache-dir -r /requirements.txt

# The DAG file is expected to live under /opt/airflow/dags/. docker-compose
# mounts this directory over; the Dockerfile is here only for image builds
# that ship the DAG bundled.
COPY dag.py /opt/airflow/dags/dag.py
COPY train_model.py /opt/airflow/dags/train_model.py
