You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/06/09 09:04:26 UTC

[airflow] 13/36: Add ADDITIONAL_AIRFLOW_EXTRAS (#9032)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit ab5e2ea062e619c8414f5b424d5bc95f0978f50e
Author: Fabian <fa...@t-online.de>
AuthorDate: Wed May 27 12:58:59 2020 +0200

    Add ADDITIONAL_AIRFLOW_EXTRAS (#9032)
    
    * Add build-arg ADDITIONAL_AIRFLOW_EXTRAS
    
    * Add ADDITIONAL_AIRFLOW_EXTRAS example and description
    
    (cherry picked from commit 5a7a3d13eed4b079841e0e9f6a671a3391ef051e)
---
 Dockerfile | 4 +++-
 IMAGES.rst | 6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 2ca5046..ef3a988 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
@@ -168,7 +169,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}
diff --git a/IMAGES.rst b/IMAGES.rst
index 5119a16..3038bfe 100644
--- a/IMAGES.rst
+++ b/IMAGES.rst
@@ -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   |
 +------------------------------------------+------------------------------------------+------------------------------------------+
@@ -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::
@@ -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