Skip to content

Commit

Permalink
Add ADDITIONAL_AIRFLOW_EXTRAS (apache#9032)
Browse files Browse the repository at this point in the history
* Add build-arg ADDITIONAL_AIRFLOW_EXTRAS

* Add ADDITIONAL_AIRFLOW_EXTRAS example and description
  • Loading branch information
wittfabian authored May 27, 2020
1 parent 6fc555d commit 5a7a3d1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#
ARG AIRFLOW_VERSION="2.0.0.dev0"
ARG AIRFLOW_EXTRAS="async,aws,azure,celery,dask,elasticsearch,gcp,kubernetes,mysql,postgres,redis,slack,ssh,statsd,virtualenv"
ARG ADDITIONAL_AIRFLOW_EXTRAS=""
ARG ADDITIONAL_PYTHON_DEPS=""

ARG AIRFLOW_HOME=/opt/airflow
Expand Down Expand Up @@ -167,7 +168,8 @@ ARG AIRFLOW_VERSION
ENV AIRFLOW_VERSION=${AIRFLOW_VERSION}

ARG AIRFLOW_EXTRAS
ENV AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}
ARG ADDITIONAL_AIRFLOW_EXTRAS
ENV AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}${ADDITIONAL_AIRFLOW_EXTRAS:+,}${ADDITIONAL_AIRFLOW_EXTRAS}

ARG ADDITIONAL_PYTHON_DEPS
ENV ADDITIONAL_PYTHON_DEPS=${ADDITIONAL_PYTHON_DEPS}
Expand Down
6 changes: 5 additions & 1 deletion IMAGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ The following build arguments (``--build-arg`` in docker build command) can be u
| ``AIRFLOW_EXTRAS`` | (see Dockerfile) | Default extras with which airflow is |
| | | installed |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_AIRFLOW_EXTRAS`` | (see Dockerfile) | Additional extras with which airflow is |
| | | installed |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_PYTHON_DEPS`` | (see Dockerfile) | Optional python packages to extend |
| | | the image with some extra dependencies |
+------------------------------------------+------------------------------------------+------------------------------------------+
Expand Down Expand Up @@ -368,7 +371,7 @@ requirements taken from v1-10-test branch in Github.
--build-arg AIRFLOW_SOURCES_FROM="entrypoint.sh" \
--build-arg AIRFLOW_SOURCES_TO="/entrypoint"
This builds the production image in version 3.7 with default airflow extras from 1.10.10 Pypi package and
This builds the production image in version 3.7 with additional airflow extras from 1.10.10 Pypi package and
additional python dependencies.

.. code-block::
Expand All @@ -382,6 +385,7 @@ additional python dependencies.
--build-arg ENTRYPOINT_FILE="https://raw.githubusercontent.com/apache/airflow/1.10.10/entrypoint.sh" \
--build-arg AIRFLOW_SOURCES_FROM="entrypoint.sh" \
--build-arg AIRFLOW_SOURCES_TO="/entrypoint" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="mssql,hdfs"
--build-arg ADDITIONAL_PYTHON_DEPS="sshtunnel oauth2client"
Image manifests
Expand Down

0 comments on commit 5a7a3d1

Please sign in to comment.