Default user's bin paths are missing if used in a CI pipeline
Summary
The paths for the python user's packages are not added unless the .bashrc runs. Our pipelines for PartyBus, do not run the .bashrc. The paths are /home/python/.local/bin:/home/python/bin. Is it possible to add these two paths to the PATH environment variable.
This problem also occurs for the other python3 images as well.
Steps to reproduce
docker run -it --rm registry1.dso.mil/ironbank/opensource/python/python39:v3.9.6 bash
echo $PATH
vs.
docker run -it --rm registry1.dso.mil/ironbank/opensource/python/python39:v3.9.6 sh
echo $PATH
What is the current bug behavior?
If used in a pipeline, python packages installed under the user will not be found.
What is the expected correct behavior?
I would expect python-packages under the user to be found in a CI pipeline setting.
Possible fixes
Add /home/python/.local/bin:/home/python/bin to the PATH environment variable in the Dockerfile.
Defintion of Done
-
Bug has been identified and corrected within the container