potiuk commented on a change in pull request #9162: URL: https://github.com/apache/airflow/pull/9162#discussion_r436891270
########## File path: Dockerfile ########## @@ -153,6 +153,23 @@ ENV PIP_VERSION=${PIP_VERSION} RUN pip install --upgrade pip==${PIP_VERSION} +ARG AIRFLOW_REPO=apache/airflow +ENV AIRFLOW_REPO=${AIRFLOW_REPO} + +ARG AIRFLOW_BRANCH=master +ENV AIRFLOW_BRANCH=${AIRFLOW_BRANCH} + +ARG AIRFLOW_EXTRAS +ARG ADDITIONAL_AIRFLOW_EXTRAS="" +ENV AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}${ADDITIONAL_AIRFLOW_EXTRAS:+,}${ADDITIONAL_AIRFLOW_EXTRAS} + +# In case of Production uild image segment we want to pre-install master version of airflow Review comment: Nope. It installis it in two steps (all happens in the build segment): 1} It first pre-installs it from v1-10-test HEAD. This gives the "optimise build time" improvement - because it will only re-install what has changed 2) then it installs airflow from PyPI including requirements.txt taken from GitHub - same version as being installed from PyPi (so when we install 1.10.11 in the future it will install airflow with the requirements that were "snapshot" at 1.10.11 tagging time. This is all installed with --user flag in the build segment. And then the .local dir is copied to main segment. This way we do not gave double layers from installing it first from Github v1-10-test and secondly from PyPI - we always copy the "final" set of install files as single layer. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org