I want to update GCC from 4.4.7 to 4.7.2 in a container(CentOS 6.9) following this tutorial How to upgrade GCC on CentOS.
In the end of the tutorial, the author uses scl enable devtoolset-1.1 bash to launch a new shell where all the environments are updated. I write the following Dockerfile:
Run ... \ && yum install devtoolset-1.1 \ && scl enable devtoolset-1.1 bash However, when I run the container from the images generated by the Dockerfile, I find that the GCC version is still 4.4.7, which indicates that I enter the old shell.
Though I success in updating GCC in the container by explicitly defining the CC, CPP, CXX variables, I still want to know how to update GCC with "scl" command in a Dockerfile. That's to say, how to enter a new shell in a Dockerfile?
Thank you in advance. ^_^