Author lemburg
Recipients FFY00, frenzy, hroncok, jaraco, lemburg, petr.viktorin, steve.dower
Date 2021-05-04.20:52:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <5269203b-26e9-f04c-fc43-70e0d363ed4c@egenix.com>
In-reply-to <1620160171.4.0.233565393077.issue43976@roundup.psfhosted.org>
Content
On 04.05.2021 22:29, Steve Dower wrote:
> 
> Would "pip install --user ..." in a Docker container also work, though? Presumably all the filesystem paths are being redirected anyway, so is there a difference?
> 
> (My assumption is that "--user" would essentially become the default if you're using the OS provided pip/Python. If you do your own build/install of it then you obviously get "default" behaviour, for better or worse.)

More modern Docker setups run the application itself under a non-root
user, but still install the packages and other dependencies as root.

See eg. Zammad's Dockerfile:
https://github.com/zammad/zammad-docker/blob/master/Dockerfile

Not sure whether that answers your question, though.

It's rather uncommon to install venvs inside Docker containers: one of the
main reasons for using containers is the added isolation, but it doesn't
make a lot of sense to add another layer of isolation inside the container.

"pip install as root" will need to continue to work and thus distros
need to get a way to make sure that it doesn't corrupt the system
installed packages. And perhaps distros can also patch pip to not
output those silly warnings anymore when using the system pip package :-)

Regarding the proposed solution: I'm not sure whether a new configure
option is the right way to go about this. Distros could simply patch
sysconfig.py, since that's the golden source of this information from
Python 3.10 onward.

setuptools' distutils version (and other packages which ship distutils)
will have to use this information instead of the copy which is/was
backed into distutils/sysconfig.py on Python 3.10+
History
Date User Action Args
2021-05-04 20:52:32lemburgsetrecipients: + lemburg, jaraco, petr.viktorin, steve.dower, hroncok, frenzy, FFY00
2021-05-04 20:52:32lemburglinkissue43976 messages
2021-05-04 20:52:32lemburgcreate