CentOS Linux 8 is EOL, attempting to install packages in it results in an error. CentOS Linux is a rebuild of RHEL (stable versions). The CentOS projects recommends to use CentOS Stream instead, which is a build of the "public development branch for RHEL".
After the early EOL was announced on 2020-12-08, alternative projects AlmaLinux and Rocky Linux have been established as binary compatible forks of RHEL 8 (stable versions).
Both Alma and Rocky seem to be solid projects, see related Wikipedia articles and their sources. Pick Alma and adjust the whole tree to use the almalinux:8 docker image instead of centos:centos8.
Fix for: Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried