First i followed the Dockerfile by Jerome Robert at jeromerobert/centos7-gcc13. I failed to install MPC 1.3 due to an MPFR 4.1 dependency, and CMAKE 3.27 due to compilation issue with OpenSSL. To download source files, i used GNU's India mirror from GNU Mirror list. Finally to install GCC 13.2, i ran ./contrib/download_prerequisites
before running ./configure
, thanks to an answer by Joseph Hansen at stackoverflow. It's a success!