Skip to content

Commit 07be6f4

Browse files
committed
build(docker): add triggers into docker image and add airflow home as python path
1 parent b7f1c1f commit 07be6f4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ USER airflow
3434

3535
COPY --from=builder --chown=airflow:airflow /app /app
3636
ENV PATH="/app/.venv/bin:$PATH"
37+
ENV PYTHONPATH="${AIRFLOW_HOME}:$PYTHONPATH"
3738

3839
COPY airflow.cfg ${AIRFLOW_HOME}/airflow.cfg
3940
COPY --chown=airflow:root dags ${AIRFLOW_HOME}/dags
41+
COPY --chown=airflow:root triggers ${AIRFLOW_HOME}/triggers
4042
# TODO: remove this and the patch files once upgrade to 3.0.3
4143
COPY --chown=airflow:root patch/utils.py /app/.venv/lib/python3.10/site-packages/airflow/migrations/utils.py
4244
COPY --chown=airflow:root patch/versions /app/.venv/lib/python3.10/site-packages/airflow/migrations/versions

Dockerfile.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ USER airflow
3434

3535
COPY --from=builder --chown=airflow:airflow /app /app
3636
ENV PATH="/app/.venv/bin:$PATH"
37+
ENV PYTHONPATH="${AIRFLOW_HOME}:$PYTHONPATH"
3738

3839
COPY airflow.cfg ${AIRFLOW_HOME}/airflow.cfg
3940
COPY --chown=airflow:root dags ${AIRFLOW_HOME}/dags
41+
COPY --chown=airflow:root triggers ${AIRFLOW_HOME}/triggers
4042
# TODO: remove this and the patch files once upgrade to 3.0.3
4143
COPY --chown=airflow:root patch/utils.py /app/.venv/lib/python3.10/site-packages/airflow/migrations/utils.py
4244
COPY --chown=airflow:root patch/versions /app/.venv/lib/python3.10/site-packages/airflow/migrations/versions

0 commit comments

Comments
 (0)