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 2022/01/22 15:49:28 UTC

[airflow] 15/33: Modernize usage of PIP in Airflow images (#20726)

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

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

commit bf701810eb0b1b98b5ee84f21d29728a3cca5479
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Fri Jan 7 11:39:19 2022 +0100

    Modernize usage of PIP in Airflow images (#20726)
    
    * remove PIP_INSTALL_USER variable
    * upgrade PIP to 21.3.1
    * remove AIRFLOW_INSTALL_USER_FLAG as it is not needed
    * remove spurious usage of --upgrade flag for PIP
    * add better diagnostics during the build for PIP location and version
    
    Separated out from #20238
    
    (cherry picked from commit 0635b97c068c32b875a11a8092f0ec42e7d698e6)
---
 Dockerfile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index bb24aa7..14d57f6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -187,7 +187,9 @@ ENV INSTALL_MYSQL_CLIENT=${INSTALL_MYSQL_CLIENT} \
     AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} \
     PIP_PROGRESS_BAR=${PIP_PROGRESS_BAR} \
     AIRFLOW_INSTALL_EDITABLE_FLAG="" \
-    UPGRADE_TO_NEWER_DEPENDENCIES=${UPGRADE_TO_NEWER_DEPENDENCIES}
+    UPGRADE_TO_NEWER_DEPENDENCIES=${UPGRADE_TO_NEWER_DEPENDENCIES} \
+    # By default PIP installs everything to ~/.local
+    PIP_USER="true"
 
 COPY scripts/docker/*.sh /scripts/docker/
 RUN bash ./scripts/docker/install_mysql.sh dev \
@@ -379,8 +381,6 @@ ARG BUILD_ID
 ARG COMMIT_SHA
 ARG AIRFLOW_IMAGE_REPOSITORY
 ARG AIRFLOW_IMAGE_DATE_CREATED
-# By default PIP will install everything in ~/.local
-ARG PIP_USER="true"
 
 ENV RUNTIME_APT_DEPS=${RUNTIME_APT_DEPS} \
     ADDITIONAL_RUNTIME_APT_DEPS=${ADDITIONAL_RUNTIME_APT_DEPS} \
@@ -397,7 +397,8 @@ ENV RUNTIME_APT_DEPS=${RUNTIME_APT_DEPS} \
     AIRFLOW_INSTALLATION_METHOD=${AIRFLOW_INSTALLATION_METHOD} \
     BUILD_ID=${BUILD_ID} \
     COMMIT_SHA=${COMMIT_SHA} \
-    PIP_USER=${PIP_USER}
+    # By default PIP installs everything to ~/.local
+    PIP_USER="true"
 
 # Note missing man directories on debian-buster
 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199