Build cpp with gcc11 on CentOS7
⚠ EOL (End-of-Life) notice: CentOS 7 reached EOL on 2024-06-30. The
centos:7
image is frozen, and its yum repos now point at the retiredmirror.centos.org, so
yum installinside the build may fail unless yum is reconfigured to use
mirror/vault.centos.org. Thedevtoolset-11SCL packages are also part of the EOL
CentOS 7 ecosystem, so their availability is no longer guaranteed. The pinned CMake
3.24.2release tarball still resolves (Kitware keeps old releases).For anything new, use a supported base image instead: e.g.
FROM almalinux:9/
FROM rockylinux:9, where a modern compiler (gcc 12+, via the built-in
gcc-toolset-12/13) installs withdnf install -y gcc g++ make. The Dockerfile
below is kept as a self-contained historical build target.
1 | ### BUILDING |