potiuk commented on a change in pull request #19189: URL: https://github.com/apache/airflow/pull/19189#discussion_r737967697
########## File path: docs/docker-stack/build.rst ########## @@ -203,14 +203,22 @@ You should be aware, about a few things: `best practices of Dockerfiles <https://docs.docker.com/develop/develop-images/dockerfile_best-practices/>`_ to make sure your image is lean and small. -* The PyPI dependencies in Apache Airflow are installed in the user library, of the "airflow" user, so - PIP packages are installed to ``~/.local`` folder as if the ``--user`` flag was specified when running PIP. - Note also that using ``--no-cache-dir`` is a good idea that can help to make your image smaller. +* Using ``--no-cache-dir`` is a good idea that can help to make your image smaller. + +* The PyPI dependencies in Apache Airflow are installed in the ``/.venv`` folder. This is virtualenv where + airflow and all dependent packages are installed, following latest ``pip`` recommendations and upcoming + `PEP 668 <https://www.python.org/dev/peps/pep-0668/>`_. The ``PATH`` inside the image is set to point first Review comment: Even if this is not a breaking change, this is a change. And I really think the users need to know why we are doing it. Similalry when we made our image OpenShift Compatible, i made a clear link to it and explained where the change came from. I believe this is the only way to limit the questions "why are wy doing it" and very straightforward way to redirect peple to the root reason. The PEP668 is where 'recomment venv usage` is really mentioned (I do not think there is any 'prior art') as consensus and way forward. When we make such change (which initially you even thought of as breaking compatibility and I think not) - we must somehow justify it (i.e. why we are doing it). Also the PEP668 has all the explanation and reasoning why using venv is better than what we did so far, so I think this is very appropriate to refer to it here - unless we can find a better justification/source/materials, explanation that will make the change "justified" and allow people to dig deeper without us having to explain it over and over. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
