Replies: 2 comments 2 replies
-
Pyenv installs a fully functional Python with (mostly) default options.
As https://stackoverflow.com/questions/5138801/how-to-compile-python-from-source-and-get-a-clean-minimal-install suggests, you can check distro scripts on what they delete -- in this case, https://github.com/docker-library/python/blob/789d789e4a8db71d3d393667971c49b845ffdc3f/3.11/alpine3.19/Dockerfile . Note that they delete |
Beta Was this translation helpful? Give feedback.
-
As per the comment above, deleting I guess you can create a feature request and if it shows sufficient demand, we'll implement it as we do with other highly-requested features. You can also implement this in a plugin, as a postinstall hook. |
Beta Was this translation helpful? Give feedback.
-
I noticed that Python installations installed with pyenv are huge compared to the smallest functional setup I know.
Compare:
With:
That's not a trivial difference, especially since I'm up to building container images with multiple Python versions using pyenv. In fact, just the test folder of a pyenv installation (which doesn't even exist in the official Python image) is larger than the whole image:
So I wonder: is there a way to strip down pyenv-based installations? How?
My first (ignorant) attempt was:
which immediately breaks
pip install
:Beta Was this translation helpful? Give feedback.
All reactions