How do I alias python2 to python3 in a docker container?
问题 I am trying to set the default python in my docker container to be python3 and have set the aliases in the dockerfile. When I open the .bashrc file, they show up. As far as I can tell, it should work but the default python version is still 2.7. if I run which python, it will still point to usr/bin/python rather than python3. Same with pip. Can anyone tell me what the problem is? Here is the command I'm using to alias: RUN \ echo 'alias python="/usr/bin/python3"' >> /root/.bashrc && \ echo