Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ WORKDIR ${AIRFLOW_HOME}

EXPOSE 8080

RUN usermod -g 0 airflow

USER ${AIRFLOW_UID}

# Having the variable in final image allows to disable providers manager warnings when
Expand Down
16 changes: 16 additions & 0 deletions docs/helm-chart/manage-dags-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ Bake DAGs in Docker image

The recommended way to update your DAGs with this chart is to build a new docker image with the latest DAG code:

.. code-block:: bash

docker build --tag "my-company/airflow:8a0da78" . -f - <<EOF
FROM apache/airflow

COPY ./dags/ \${AIRFLOW_HOME}/dags/

EOF

.. note::

In airflow images prior to version 2.0.2, there was a bug that required you to use
a bit longer Dockerfile, to make sure the image remains OpenShift-compatible (i.e dag
has root group similarly as other files). In 2.0.2 this has been fixed.

.. code-block:: bash

docker build --tag "my-company/airflow:8a0da78" . -f - <<EOF
Expand All @@ -38,6 +53,7 @@ The recommended way to update your DAGs with this chart is to build a new docker

EOF


Then publish it in the accessible registry:

.. code-block:: bash
Expand Down
8 changes: 2 additions & 6 deletions scripts/ci/libraries/_kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,9 @@ function kind::build_image_for_kubernetes_tests() {
docker build --tag "${AIRFLOW_PROD_IMAGE_KUBERNETES}" . -f - <<EOF
FROM ${AIRFLOW_PROD_IMAGE}

USER root
COPY airflow/example_dags/ \${AIRFLOW_HOME}/dags/

COPY --chown=airflow:root airflow/example_dags/ \${AIRFLOW_HOME}/dags/

COPY --chown=airflow:root airflow/kubernetes_executor_templates/ \${AIRFLOW_HOME}/pod_templates/

USER airflow
COPY airflow/kubernetes_executor_templates/ \${AIRFLOW_HOME}/pod_templates/

EOF
echo "The ${AIRFLOW_PROD_IMAGE_KUBERNETES} is prepared for test kubernetes deployment."
Expand Down