I have a dockerfile building oel6 linux that uses the SCL python27.
For the docker build, using the
SHELL command works to execute the commands correctly (i.e. if i were to insert a
RUN python --version i get 2.7).
/root/.bashrc that sets
source scl_source enable python27 works great for any interactive sessions with the container (
python --version 2.7)
However, any commands executed non-interactively (i.e.
docker run oel6 pyhton --version) is always 2.6 no matter what i try.
Take what i've tried with a grain of salt as i may have tried it incorrectly but i've tried setting the entrypoint as the command, i've tried executing a script that contains the commands as an entrypoint, i've tried putting it in /etc/profile.d/.
Any help appreciated.