Python without pip/setuptools
Python3 package takes 50MB on disk, out of which 10MB (20%) is occupied by pip and setuptools.
While usually these tools are essential to make Python actually usable, with new docker multi-stage builds, they are no longer required in the final image. It will be nice to have python-lean package that does not include them, so we can shave those 10MB off the final image, e.g:
FROM alpine as base
RUN apk-add --no-cache python3
RUN PYTHONUSERBASE=/pyroot pip install --user requests
FROM alpine as prod
RUN apk-add --no-cache python3-lean
COPY --from=base /pyroot /
What do you think?
(from redmine: issue id 9622, created on 2018-11-04)