Open dotysan opened 5 months ago
We prepend to PATH
to ensure that the Python we just installed there is definitely 100% the Python folks will get if they rely on PATH
expansion (and because duplicates are otherwise harmless).
Yes, I get it. Minor nit, indeed.
However, on all base images currently used, one would have to install python in /usr/local/sbin for any change in behavior. Which is astronomically unlikely.
I propose the ENV PATH /usr/local/bin:$PATH
line in all Dockerfile here be removed entirely, as it is superfluous.
Minor nit. We blindly prepend /usr/local/bin onto the $PATH without looking to see if it's already there. This leads to duplication.
docker run --rm -it python:3.12-slim
Expected output:
/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
Or possibly the original path is fine? Since
/usr/local/sbin
already occurs before/usr/bin
and/bin
.This applies to all the base images in here. They all come with
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
for the root user.