You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2022/03/15 16:55:50 UTC

[trafficcontrol] branch 6.1.x updated: Rocky Linux 8 support (#6535)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.1.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/6.1.x by this push:
     new cfb321e  Rocky Linux 8 support (#6535)
cfb321e is described below

commit cfb321ec2a1a8ef1cad0bc0f2ca7c8d453bba5b4
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Tue Feb 1 15:29:20 2022 -0800

    Rocky Linux 8 support (#6535)
    
    * Base centos:8-based Dockerfiles on rockylinux:8
    
    * Support Rocky Linux 8, drop CentOS 8 support, retain CentOS 7 support
    
    * Import all RPM-GPG-KEY-prefixed keys in /etc/pki/rpm-gpg/
    
    * Remove nodejs RPM workaround since nodesource/distributions#1290 is fixed
    
    * Refactor `find` usage since Rocky Linux image does not include `findutils`
    
    * Add `finduils` as a dependency for Rocky Linux-based images using the `find` command
    
    * Build builder images if they were modified
    
    * Get ATS version from `variables.env` now that #6530 is merged
    
    * Lengthen underline
    
    (cherry picked from commit dd698590919d2107879776c22261e2967eeb3388)
---
 .github/actions/build-rpms/build-rpms.sh           |  5 +-
 CHANGELOG.md                                       |  4 ++
 docs/source/admin/quick_howto/ciab.rst             | 10 ++--
 docs/source/development/building.rst               | 59 +++++++++++-----------
 docs/source/overview/profiles_and_parameters.rst   |  2 +-
 infrastructure/cdn-in-a-box/Makefile               |  2 +-
 infrastructure/cdn-in-a-box/bin/ats-version.sh     |  2 +-
 infrastructure/cdn-in-a-box/cache/Dockerfile       | 10 ++--
 .../docker-compose.traffic-portal-test.yml         |  2 +
 infrastructure/cdn-in-a-box/docker-compose.yml     | 16 ++++++
 .../cdn-in-a-box/optional/socksproxy/Dockerfile    | 12 +++--
 .../cdn-in-a-box/optional/vnc/Dockerfile           |  6 ++-
 .../cdn-in-a-box/traffic_monitor/Dockerfile        |  8 ++-
 infrastructure/cdn-in-a-box/traffic_ops/Dockerfile | 10 ++--
 .../cdn-in-a-box/traffic_portal/Dockerfile         | 19 ++++---
 .../traffic_portal_integration_test/Dockerfile     |  8 ++-
 .../cdn-in-a-box/traffic_router/Dockerfile         | 28 +++++++---
 .../cdn-in-a-box/traffic_stats/Dockerfile          |  8 ++-
 .../docker/build/Dockerfile-cache-config           | 13 ++---
 infrastructure/docker/build/Dockerfile-docs        | 13 ++---
 infrastructure/docker/build/Dockerfile-fakeOrigin  | 13 ++---
 infrastructure/docker/build/Dockerfile-grove       | 13 ++---
 infrastructure/docker/build/Dockerfile-grovetccfg  | 13 ++---
 infrastructure/docker/build/Dockerfile-source      | 13 ++---
 .../docker/build/Dockerfile-tc-health-client       | 13 ++---
 .../docker/build/Dockerfile-traffic_monitor        | 13 ++---
 infrastructure/docker/build/Dockerfile-traffic_ops | 13 ++---
 .../docker/build/Dockerfile-traffic_portal         | 13 ++---
 .../docker/build/Dockerfile-traffic_router         | 13 ++---
 .../docker/build/Dockerfile-traffic_stats          | 13 ++---
 infrastructure/docker/build/Dockerfile-tsb         |  8 +--
 infrastructure/docker/build/docker-compose-opt.yml |  4 ++
 infrastructure/docker/build/docker-compose.yml     | 22 ++++++++
 pkg                                                |  2 +-
 traffic_monitor/tests/_integration/Dockerfile      |  2 +-
 traffic_monitor/tests/_integration/tm/Dockerfile   |  2 +-
 traffic_monitor/tools/testcaches/Dockerfile        |  2 +-
 traffic_monitor/tools/testto/Dockerfile            |  2 +-
 traffic_server/_tsb/Dockerfile                     | 10 ++--
 traffic_server/_tsb/docker-compose.yml             |  2 +
 40 files changed, 237 insertions(+), 186 deletions(-)

diff --git a/.github/actions/build-rpms/build-rpms.sh b/.github/actions/build-rpms/build-rpms.sh
index aaef054..12a6ba4 100755
--- a/.github/actions/build-rpms/build-rpms.sh
+++ b/.github/actions/build-rpms/build-rpms.sh
@@ -30,10 +30,7 @@ if [[ "$GITHUB_REF" == refs/pull/*/merge ]]; then
 else
 	files_changed="$(git diff --name-only HEAD~4 HEAD --)" # Files changed by the last 4 commits
 fi
-if <<<"$files_changed" grep '^GO_VERSION$' ||
-	{ [[ "$ATC_COMPONENT" == traffic_router ]] &&
-		<<<"$files_changed" grep '^infrastructure/docker/build/Dockerfile-traffic_router$'; };
-then
+if <<<"$files_changed" grep '^GO_VERSION$' -e '' || <<<"$files_changed" grep '^infrastructure/docker/build/'; then
 	pkg_command+=(-b)
 fi
 
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 719ffaa..5e0e2af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 
 ## [unreleased]
+### - Dropped CentOS 8 support
+
+### Changed
+- Added Rocky Linux 8 support
 
 ## [6.1.0] - 2022-01-18
 ### Added
diff --git a/docs/source/admin/quick_howto/ciab.rst b/docs/source/admin/quick_howto/ciab.rst
index 92be425..8abcc0f 100644
--- a/docs/source/admin/quick_howto/ciab.rst
+++ b/docs/source/admin/quick_howto/ciab.rst
@@ -44,12 +44,12 @@ These can all be supplied manually via the steps in :ref:`dev-building` (for Tra
 
 .. tip:: When updating CDN-in-a-Box, there is no need to remove old images before building new ones. Docker detects which files are updated and only reuses cached layers that have not changed.
 
-By default, CDN in a Box will be based on CentOS 8. To base CDN in a Box on CentOS 7, set the ``RHEL_VERSION`` environment variable to ``7`` (for CDN in a Box, it defaults to ``8``):
+By default, CDN in a Box will be based on Rocky Linux 8. To base CDN in a Box on CentOS 7, set the ``BASE_IMAGE`` environment variable to ``centos`` and set the ``RHEL_VERSION`` environment variable to ``7`` (for CDN in a Box, ``BASE_IMAGE`` defaults to ``rockylinux`` and ``RHEL_VERSION`` defaults to ``8``):
 
 .. code-block:: shell
-	:caption: Building CDN in a Box to run CentOS 7 instead of CentOS 8
+	:caption: Building CDN in a Box to run CentOS 7 instead of Rocky Linux 8
 
-	export RHEL_VERSION=7
+	export BASE_IMAGE=centos RHEL_VERSION=7
 	make # Builds RPMs for CentOS 7
 	docker-compose build --parallel # Builds CentOS 7 CDN in a Box images
 
@@ -214,8 +214,8 @@ Importing the :abbr:`CA (Certificate Authority)` certificate on Windows
 #. Import the CIAB intermediate :abbr:`CA (Certificate Authority)` certificate into :menuselection:`Trusted Root Certification Authorities --> Certificates`.
 #. Restart all HTTPS clients (browsers, etc).
 
-Importing the :abbr:`CA (Certificate Authority)` certificate on CentOS 8 (Linux)
---------------------------------------------------------------------------------
+Importing the :abbr:`CA (Certificate Authority)` certificate on Rocky Linux 8 (Linux)
+-------------------------------------------------------------------------------------
 #. Copy the CIAB full chain :abbr:`CA (Certificate Authority)` certificate bundle from :file:`infrastructure/cdn-in-a-box/traffic_ops/ca/CIAB-CA-fullchain.crt` to path :file:`/etc/pki/ca-trust/source/anchors/`.
 #. Run ``update-ca-trust-extract`` as the root user or with :manpage:`sudo(8)`.
 #. Restart all HTTPS clients (browsers, etc).
diff --git a/docs/source/development/building.rst b/docs/source/development/building.rst
index 696e272..0b9d9f4 100644
--- a/docs/source/development/building.rst
+++ b/docs/source/development/building.rst
@@ -20,7 +20,7 @@ Building Traffic Control
 ************************
 The build steps for Traffic Control components are all pretty much the same, despite that they are written in a variety of different languages and frameworks. This is accomplished by using Docker.
 
-.. note:: Currently, both listed methods of building Traffic Control components will produce ``*.rpm`` files, meaning that the support of these components is limited to RedHat-based distributions - and none of them are currently tested (or guaranteed to work) outside of CentOS 7 and CentOS 8, specifically.
+.. note:: Currently, both listed methods of building Traffic Control components will produce ``*.rpm`` files, meaning that the support of these components is limited to RedHat-based distributions - and none of them are currently tested (or guaranteed to work) outside of Rocky Linux 8 and CentOS 7, specifically.
 
 Downloading Traffic Control
 ===========================
@@ -57,7 +57,7 @@ Options
 
 .. option:: -8
 
-	Build RPMs targeting CentOS 8 (default).
+	Build RPMs targeting Rocky Linux 8 (default).
 
 	.. versionchanged:: ATCv6.0.0
 
@@ -165,29 +165,30 @@ Install the Dependencies
 
 .. table:: Build dependencies for Traffic Control
 
-	+----------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
-	| OS/Package Manager         | Common dependencies | :ref:`dev-traffic-monitor` | :ref:`dev-traffic-ops` | :ref:`dev-traffic-portal` | :ref:`dev-traffic-router` | :ref:`dev-traffic-stats` | Grove    | Grove TC Config (grovetccfg) | :ref:`Docs <docs-guide>` |
-	+============================+=====================+============================+========================+===========================+===========================+==========================+==========+==============================+==========================+
-	| macOS\ [#mac-jdk]_         | - rpm               | - go                       | - go                   | - npm                     | - maven                   | - go                     | - go     | - go                         | - python3                |
-	| (homebrew_)                |                     |                            |                        | - grunt-cli               |                           |                          |          |                              |                          |
-	+----------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
-	| CentOS\ [#centos-go]_,     | - git               |                            |                        | - epel-release            | - java-11-openjdk         |                          |          |                              | - python3-devel          |
-	| Red Hat,                   | - rpm-build         |                            |                        | - npm                     | - maven                   |                          |          |                              | - gcc                    |
-	| Fedora                     | - rsync             |                            |                        | - nodejs-grunt-cli        |                           |                          |          |                              | - make                   |
-	| (yum_)                     |                     |                            |                        |                           |                           |                          |          |                              |                          |
-	+----------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
-	| Arch Linux,                | - git               | - go                       | - go                   | - npm                     | - jdk11-openjdk           | - go                     | - go     | - go                         | - python-pip             |
-	| Manjaro                    | - rpm-tools         |                            |                        | - grunt-cli               | - maven                   |                          |          |                              | - python-sphinx          |
-	| (pacman_)                  | - diff              |                            |                        |                           |                           |                          |          |                              | - make                   |
-	+----------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
-	| Windows                    | - git               |                            |                        |                           | - curl                    |                          |          |                              |                          |
-	| (cygwin_)\ [#windeps]_     | - rpm-build         |                            |                        |                           |                           |                          |          |                              |                          |
-	|                            | - rsync             |                            |                        |                           |                           |                          |          |                              |                          |
-	+----------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
-	| Windows                    |                     | - golang                   | - golang               | - nodejs                  | - openjdk11               | - golang                 | - golang | - golang                     | - python                 |
-	| (chocolatey_)\ [#windeps]_ |                     |                            |                        |                           | - maven                   |                          |          |                              | - pip                    |
-	|                            |                     |                            |                        |                           |                           |                          |          |                              | - make                   |
-	+----------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
+	+---------------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
+	| OS/Package Manager              | Common dependencies | :ref:`dev-traffic-monitor` | :ref:`dev-traffic-ops` | :ref:`dev-traffic-portal` | :ref:`dev-traffic-router` | :ref:`dev-traffic-stats` | Grove    | Grove TC Config (grovetccfg) | :ref:`Docs <docs-guide>` |
+	+=================================+=====================+============================+========================+===========================+===========================+==========================+==========+==============================+==========================+
+	| macOS\ [#mac-jdk]_              | - rpm               | - go                       | - go                   | - npm                     | - maven                   | - go                     | - go     | - go                         | - python3                |
+	| (homebrew_)                     |                     |                            |                        | - grunt-cli               |                           |                          |          |                              |                          |
+	+---------------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
+	| Rocky\ Linux\ [#rocky-go]_,     | - git               |                            |                        | - epel-release            | - java-11-openjdk         |                          |          |                              | - python3-devel          |
+	| Red Hat,                        | - rpm-build         |                            |                        | - npm                     | - maven                   |                          |          |                              | - gcc                    |
+	| Fedora,                         | - rsync             |                            |                        | - nodejs-grunt-cli        |                           |                          |          |                              | - make                   |
+	| CentOS                          |                     |                            |                        |                           |                           |                          |          |                              |                          |
+	| (yum_)                          |                     |                            |                        |                           |                           |                          |          |                              |                          |
+	+---------------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
+	| Arch Linux,                     | - git               | - go                       | - go                   | - npm                     | - jdk11-openjdk           | - go                     | - go     | - go                         | - python-pip             |
+	| Manjaro                         | - rpm-tools         |                            |                        | - grunt-cli               | - maven                   |                          |          |                              | - python-sphinx          |
+	| (pacman_)                       | - diff              |                            |                        |                           |                           |                          |          |                              | - make                   |
+	+---------------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
+	| Windows                         | - git               |                            |                        |                           | - curl                    |                          |          |                              |                          |
+	| (cygwin_)\ [#windeps]_          | - rpm-build         |                            |                        |                           |                           |                          |          |                              |                          |
+	|                                 | - rsync             |                            |                        |                           |                           |                          |          |                              |                          |
+	+---------------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
+	| Windows                         |                     | - golang                   | - golang               | - nodejs                  | - openjdk11               | - golang                 | - golang | - golang                     | - python                 |
+	| (chocolatey_)\ [#windeps]_      |                     |                            |                        |                           | - maven                   |                          |          |                              | - pip                    |
+	|                                 |                     |                            |                        |                           |                           |                          |          |                              | - make                   |
+	+---------------------------------+---------------------+----------------------------+------------------------+---------------------------+---------------------------+--------------------------+----------+------------------------------+--------------------------+
 
 .. _homebrew:   https://brew.sh/
 .. _yum:        https://wiki.centos.org/PackageManagement/Yum
@@ -219,12 +220,12 @@ This is the equivalent of running
 
 If any component fails to build, no further component builds will be attempted.
 
-By default, the RPMs will be built targeting CentOS 7. CentOS 8 is also a supported build target. You can choose which CentOS version to build for (7, 8, etc.) by setting the ``RHEL_VERSION`` environment variable:
+By default, the RPMs will be built targeting Rocky Linux 8. CentOS 7 is also a supported build target. You can choose which RHEL version to build for (8, 7, etc.) by setting the ``RHEL_VERSION`` environment variable:
 
 .. code-block:: shell
-	:caption: Building RPMs that target CentOS 8 without the build host needing to be CentOS 8
+	:caption: Building RPMs that target CentOS 7 without the build host needing to be CentOS 7
 
-	export RHEL_VERSION=8
+	export RHEL_VERSION=7
 
 .. warning:: Although there are no known issues with natively-built RPMs, the official, supported method of building the RPMs is by using :ref:`pkg <pkg>` or :ref:`docker-compose <build-with-dc>`. Use natively-built RPMs at your own risk.
 
@@ -240,5 +241,5 @@ See instructions for :ref:`building the documentation <docs-build>`.
 .. [#optional-project] This project is "optional", which means that it cannot be built unless :option:`-o` is given.
 .. [#default-project] This is a default project, which will be built if ``pkg`` is run with no ``projects`` argument
 .. [#mac-jdk] If you are on macOS, you additionally need to :ref:`dev-tr-mac-jdk`.
-.. [#centos-go] If you are on CentOS, you need to `download Go directly <https://golang.org/dl/>`_ instead of using a package manager in order to get the latest Go version. For most users, the desired architecture is AMD64/x86_64.
+.. [#rocky-go] If you are on Rocky Linux, you need to `download Go directly <https://golang.org/dl/>`_ instead of using a package manager in order to get the latest Go version. For most users, the desired architecture is AMD64/x86_64.
 .. [#windeps] If you are on Windows, you need to install **both** the Cygwin packages and the Chocolatey packages in order to build the Apache Traffic Control RPMs natively.
diff --git a/docs/source/overview/profiles_and_parameters.rst b/docs/source/overview/profiles_and_parameters.rst
index ae22120..c2c8305 100644
--- a/docs/source/overview/profiles_and_parameters.rst
+++ b/docs/source/overview/profiles_and_parameters.rst
@@ -477,7 +477,7 @@ Furthermore, for a given value of ``N``, if a Parameter exists on the :term:`cac
 
 package
 '''''''
-This is a special, reserved Config File that isn't a file at all. When a Parameter's Config File is ``package``, then its name is interpreted as the name of a package. :term:`ORT` on the server using the :ref:`Profile <profiles>` that has this Parameter will attempt to install a package by that name, interpreting the Parameter's Value_ as a version string if it is not empty. The package manager used will be :manpage:`yum(8)`, regardless of system (though the Python version of :term:`ORT` [...]
+This is a special, reserved Config File that isn't a file at all. When a Parameter's Config File is ``package``, then its name is interpreted as the name of a package. :term:`ORT` on the server using the :ref:`Profile <profiles>` that has this Parameter will attempt to install a package by that name, interpreting the Parameter's Value_ as a version string if it is not empty. The package manager used will be :manpage:`yum(8)`, regardless of system (though the Python version of :term:`ORT` [...]
 
 The current implementation of :term:`ORT` will expect Parameters to exist on a :term:`cache server`'s :ref:`Profile <profiles>` with the :ref:`Names <parameter-name>` ``astats_over_http`` and ``trafficserver`` before being run the first time, as both of these are required for a :term:`cache server` to operate within a Traffic Control CDN. It is possible to install these outside of :term:`ORT` - and indeed even outside of :manpage:`yum(8)` - but such configuration is not officially supported.
 
diff --git a/infrastructure/cdn-in-a-box/Makefile b/infrastructure/cdn-in-a-box/Makefile
index 0896aad..aba16e8 100644
--- a/infrastructure/cdn-in-a-box/Makefile
+++ b/infrastructure/cdn-in-a-box/Makefile
@@ -18,7 +18,7 @@
 ############################################################
 # Dockerfile to build Edge-Tier Cache container images for
 # Apache Traffic Control
-# Based on CentOS 8
+# Based on Rocky Linux 8
 ############################################################
 
 ifeq ($(RHEL_VERSION),)
diff --git a/infrastructure/cdn-in-a-box/bin/ats-version.sh b/infrastructure/cdn-in-a-box/bin/ats-version.sh
index 723a077..9df0c5f 100755
--- a/infrastructure/cdn-in-a-box/bin/ats-version.sh
+++ b/infrastructure/cdn-in-a-box/bin/ats-version.sh
@@ -27,7 +27,7 @@ remote_ats_version() {
 	local gitbox_url=https://gitbox.apache.org/repos/asf
 	local repo="${project}.git"
 	local branch refs commit last_tag release
-	branch="$(grep 'ATS_VERSION=' "${script_dir}/../../../cache-config/testing/docker/docker-compose-ats-build.yml" | cut -d= -f2)"
+	branch="$(grep 'ATS_VERSION=' "${script_dir}/../../../cache-config/testing/docker/variables.env" | cut -d= -f2)"
 	refs="$(curl -fs "${gitbox_url}/${repo}/info/refs?service=git-upload-pack" |
 		sed -E 's/^00[0-9a-f]{2}//g' |
 		tr -d '\0')"
diff --git a/infrastructure/cdn-in-a-box/cache/Dockerfile b/infrastructure/cdn-in-a-box/cache/Dockerfile
index 8df5e9b..9454ef0 100644
--- a/infrastructure/cdn-in-a-box/cache/Dockerfile
+++ b/infrastructure/cdn-in-a-box/cache/Dockerfile
@@ -18,11 +18,13 @@
 ############################################################
 # Dockerfile to build Edge-Tier Cache container images for
 # Apache Traffic Control
-# Based on CentOS 8
+# Based on Rocky Linux 8
 ############################################################
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} AS common-traffic-server-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} AS common-traffic-server-dependencies
 ARG RHEL_VERSION=8
 # Makes RHEL_VERSION available at runtime
 ENV RHEL_VERSION="$RHEL_VERSION"
@@ -46,6 +48,8 @@ RUN dnf -y install epel-release && \
     fi && \
     dnf -y install              \
         brotli                  \
+        # find is required by to-access.sh
+        findutils               \
         GeoIP                   \
         git                     \
         groff-base              \
diff --git a/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml b/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml
index b5114e5..85724f1 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.traffic-portal-test.yml
@@ -32,6 +32,8 @@ services:
       context: ../..
       dockerfile: infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     env_file:
       - variables.env
diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml b/infrastructure/cdn-in-a-box/docker-compose.yml
index 25b2fc0..1c70110 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -57,6 +57,8 @@ services:
       context: ../../
       dockerfile: infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         TRAFFIC_OPS_RPM: infrastructure/cdn-in-a-box/traffic_ops/traffic_ops.rpm
     depends_on:
@@ -83,6 +85,8 @@ services:
       context: .
       dockerfile: traffic_portal/Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         TRAFFIC_PORTAL_RPM: traffic_portal/traffic_portal.rpm
     depends_on:
@@ -101,6 +105,8 @@ services:
       context: .
       dockerfile: traffic_monitor/Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         TRAFFIC_MONITOR_RPM: traffic_monitor/traffic_monitor.rpm
     depends_on:
@@ -119,6 +125,8 @@ services:
       context: .
       dockerfile: traffic_router/Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         TRAFFIC_ROUTER_RPM: traffic_router/traffic_router.rpm
         TOMCAT_RPM: traffic_router/tomcat.rpm
@@ -137,6 +145,8 @@ services:
       context: .
       dockerfile: traffic_stats/Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         TRAFFIC_TS_RPM: traffic_stats/traffic_stats.rpm
     image: trafficstats
@@ -170,6 +180,8 @@ services:
       dockerfile: infrastructure/cdn-in-a-box/cache/Dockerfile
       target: edge
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         ORT_RPM: infrastructure/cdn-in-a-box/cache/trafficcontrol-cache-config.rpm
     domainname: infra.ciab.test
@@ -190,6 +202,8 @@ services:
       dockerfile: infrastructure/cdn-in-a-box/cache/Dockerfile
       target: mid
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         ORT_RPM: infrastructure/cdn-in-a-box/cache/trafficcontrol-cache-config.rpm
     domainname: infra.ciab.test
@@ -210,6 +224,8 @@ services:
       dockerfile: infrastructure/cdn-in-a-box/cache/Dockerfile
       target: mid
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
         ORT_RPM: infrastructure/cdn-in-a-box/cache/trafficcontrol-cache-config.rpm
     domainname: infra.ciab.test
diff --git a/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile b/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile
index 1fe7d75..0c6e8cb 100644
--- a/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile
+++ b/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile
@@ -17,10 +17,12 @@
 
 ############################################################
 # Dockerfile to build optional CiaB Socks Proxy
-# Based on CentOS 8
+# Based on Rocky Linux 8
 ############################################################
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION}
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION}
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
@@ -31,8 +33,8 @@ ARG DANTES_SRC=https://www.inet.no/dante/files/dante-1.4.2.tar.gz
 
 RUN dnf install -y net-tools bind-utils iproute wget curl automake autoconf gcc make && \
     curl -Ls -o /tmp/dante.tar.gz $DANTES_SRC && \
-    tar -C /usr/src -zxvpf $(find /tmp -type f -name dante\*) && \
-    cd $(find /usr/src -type d -name dante\*) && \
+    tar -C /usr/src -zxvpf /tmp/dante.tar.gz && \
+    cd /usr/src/dante* && \
     ./configure --prefix=/usr && \
     make -j 4 && \
     make install && \
diff --git a/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile b/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
index 2d7003e..f869e82 100644
--- a/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
+++ b/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
@@ -15,8 +15,10 @@
 # specific language governing permissions and limitations
 # under the License.
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION}
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION}
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
index ad85141..2ec4e56 100644
--- a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
@@ -19,8 +19,10 @@
 # Based on CentOS
 ############################################################
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as trafficmonitor-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as trafficmonitor-dependencies
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
@@ -33,6 +35,8 @@ RUN dnf install -y epel-release && \
         nmap-ncat \
         iproute \
         net-tools \
+        # find is required by to-access.sh
+        findutils \
         gettext \
         bind-utils \
         openssl \
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index 342d9d8..f3574b4 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -17,11 +17,13 @@
 
 ############################################################
 # Dockerfile to build Traffic Ops container images
-# Based on CentOS 8
+# Based on Rocky Linux 8
 ############################################################
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as trafficops-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as trafficops-dependencies
 ARG RHEL_VERSION=8
 # Makes RHEL_VERSION available in later layers without needing to specify it again
 ENV RHEL_VERSION="$RHEL_VERSION"
@@ -46,6 +48,8 @@ RUN set -o nounset -o errexit && \
 	dnf -y $use_repo -- install postgresql13; \
 	dnf -y $enable_repo install \
 		bind-utils           \
+		# find is required by to-access.sh
+		findutils            \
 		gettext              \
 		# ip commands is used in set-to-ips-from-dns.sh
 		iproute              \
diff --git a/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile b/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
index c9bbbd8..55babf7 100644
--- a/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
@@ -17,11 +17,13 @@
 
 ############################################################
 # Dockerfile to build Traffic Portal container images
-# Based on CentOS 8
+# Based on Rocky Linux 8
 ############################################################
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION}
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION}
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
@@ -36,16 +38,13 @@ ARG TRAFFIC_PORTAL_RPM=traffic_portal/traffic_portal.rpm
 ARG TO_HOST=$TO_HOST
 
 # Install and delete the TRAFFIC_PORTAL_RPM when finished
-RUN dnf install -y \
-    epel-release yum-utils && \
-    ### Remove these lines once nodesource/distributions#1290 is fixed
-    set -o pipefail && \
-    yumdownloader -q --url nodejs | xargs dnf -y install && \
-    ###
+RUN dnf install -y epel-release && \
     dnf install -y \
       jq \
-      #nodejs
+      nodejs \
       openssl \
+      # find is required by to-access.sh
+      findutils \
       gettext \
       bind-utils \
       net-tools && \
diff --git a/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile b/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
index d633cb0..94c6de5 100644
--- a/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
@@ -15,8 +15,10 @@
 # specific language governing permissions and limitations
 # under the License.
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as os-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as os-dependencies
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
@@ -32,6 +34,8 @@ RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
         bind-utils \
         # chromium and jq are in EPEL
         epel-release \
+        # find is required by to-access.sh
+        findutils \
         GConf2 \
         git \
         java-1.8.0-openjdk \
diff --git a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile
index d8e8f84..35c5301 100644
--- a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile
@@ -16,11 +16,13 @@
 # under the License.
 ############################################################
 # Dockerfile to build Traffic Router 3.0
-# Based on CentOS 8
+# Based on Rocky Linux 8
 ############################################################
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION}
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION}
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
@@ -34,10 +36,22 @@ ARG TRAFFIC_ROUTER_RPM=traffic_router/traffic_router.rpm
 ARG TOMCAT_RPM=traffic_router/tomcat.rpm
 
 RUN dnf -y install epel-release && \
-    dnf -y install jq git rpm-build net-tools iproute nc wget tar unzip \
-          perl-JSON perl-WWW-Curl which make autoconf automake gcc gcc-c++ apr apr-devel \
-          openssl openssl-devel bind-utils net-tools perl-JSON-PP gettext \
-          java-11-openjdk-headless java-11-openjdk-devel tomcat-native && \
+    dnf -y install \
+        jq \
+        # find is required by to-access.sh
+        findutils \
+        git \
+        rpm-build \
+        net-tools \
+        iproute \
+        nc \
+        wget \
+        tar \
+        unzip \
+
+        perl-JSON perl-WWW-Curl which make autoconf automake gcc gcc-c++ apr apr-devel \
+        openssl openssl-devel bind-utils net-tools perl-JSON-PP gettext \
+        java-11-openjdk-headless java-11-openjdk-devel tomcat-native && \
     dnf -y clean all && \
     ln -sfv $(realpath /usr/lib/jvm/java-11) /opt/java
 
diff --git a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
index b611bd8..1fe212a 100644
--- a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
@@ -19,8 +19,10 @@
 # Based on CentOS
 ############################################################
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} AS trafficstats-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} AS trafficstats-dependencies
 ARG RHEL_VERSION=8
 
 RUN if [[ "${RHEL_VERSION%%.*}" -eq 7 ]]; then \
@@ -32,6 +34,8 @@ RUN dnf install -y epel-release && \
         jq \
         nmap-ncat \
         net-tools \
+        # find is required by to-access.sh
+        findutils \
         gettext \
         bind-utils \
         openssl && \
diff --git a/infrastructure/docker/build/Dockerfile-cache-config b/infrastructure/docker/build/Dockerfile-cache-config
index 3a1e71e..13e4b06 100644
--- a/infrastructure/docker/build/Dockerfile-cache-config
+++ b/infrastructure/docker/build/Dockerfile-cache-config
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-docs b/infrastructure/docker/build/Dockerfile-docs
index 2e1d2db..2ffa233 100644
--- a/infrastructure/docker/build/Dockerfile-docs
+++ b/infrastructure/docker/build/Dockerfile-docs
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-fakeOrigin b/infrastructure/docker/build/Dockerfile-fakeOrigin
index 066354a..6d03d2f 100644
--- a/infrastructure/docker/build/Dockerfile-fakeOrigin
+++ b/infrastructure/docker/build/Dockerfile-fakeOrigin
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-grove b/infrastructure/docker/build/Dockerfile-grove
index 2111773..cbe065d 100644
--- a/infrastructure/docker/build/Dockerfile-grove
+++ b/infrastructure/docker/build/Dockerfile-grove
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-grovetccfg b/infrastructure/docker/build/Dockerfile-grovetccfg
index 658b647..d850acc 100644
--- a/infrastructure/docker/build/Dockerfile-grovetccfg
+++ b/infrastructure/docker/build/Dockerfile-grovetccfg
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-source b/infrastructure/docker/build/Dockerfile-source
index 3b8e1cc..df5d94b 100644
--- a/infrastructure/docker/build/Dockerfile-source
+++ b/infrastructure/docker/build/Dockerfile-source
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-tc-health-client b/infrastructure/docker/build/Dockerfile-tc-health-client
index 6652c98..a060dcc 100644
--- a/infrastructure/docker/build/Dockerfile-tc-health-client
+++ b/infrastructure/docker/build/Dockerfile-tc-health-client
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-traffic_monitor b/infrastructure/docker/build/Dockerfile-traffic_monitor
index a84e68a..d4704d0 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_monitor
+++ b/infrastructure/docker/build/Dockerfile-traffic_monitor
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-traffic_ops b/infrastructure/docker/build/Dockerfile-traffic_ops
index a49d91f..0041774 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_ops
+++ b/infrastructure/docker/build/Dockerfile-traffic_ops
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-traffic_portal b/infrastructure/docker/build/Dockerfile-traffic_portal
index 646e8ec..c71903b 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_portal
+++ b/infrastructure/docker/build/Dockerfile-traffic_portal
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-traffic_router b/infrastructure/docker/build/Dockerfile-traffic_router
index 572d352..bcc189e 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_router
+++ b/infrastructure/docker/build/Dockerfile-traffic_router
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-traffic_stats b/infrastructure/docker/build/Dockerfile-traffic_stats
index b791b7f..9a79fe8 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_stats
+++ b/infrastructure/docker/build/Dockerfile-traffic_stats
@@ -14,8 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
@@ -25,12 +27,7 @@ MAINTAINER dev@trafficcontrol.apache.org
 VOLUME /trafficcontrol
 
 ### Common for all sub-component builds
-RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
-	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
-	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y update ca-certificates && \
 	yum -y install \
diff --git a/infrastructure/docker/build/Dockerfile-tsb b/infrastructure/docker/build/Dockerfile-tsb
index bd8b742..2e3d484 100644
--- a/infrastructure/docker/build/Dockerfile-tsb
+++ b/infrastructure/docker/build/Dockerfile-tsb
@@ -15,8 +15,10 @@
 # specific language governing permissions and limitations
 # under the License.
 
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as tsb-build
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as tsb-build
 RUN yum clean all && yum -y install git
 COPY GO_VERSION /
 RUN curl -L https://dl.google.com/go/go$(cat /GO_VERSION).linux-amd64.tar.gz | tar -C /usr/local -xz && ln -s /usr/local/go/bin/go /usr/bin/go
@@ -25,7 +27,7 @@ RUN curl -L https://dl.google.com/go/go$(cat /GO_VERSION).linux-amd64.tar.gz | t
 RUN mkdir -p /go/src/github.com/comcast/tsb && cd /go/src/github.com/comcast/tsb && git init && git remote add origin https://github.com/comcast/tsb && git fetch --depth=1 origin 851be3e137b20ba5d2d1eefd07cd303dc5f53865 && git reset --hard FETCH_HEAD
 RUN cd /go/src/github.com/comcast/tsb && CGOENABLED=0 go build -o /usr/bin/tsb
 
-FROM centos:${RHEL_VERSION}
+FROM ${BASE_IMAGE}:${RHEL_VERSION}
 MAINTAINER dev@trafficcontrol.apache.org
 
 RUN	yum -y install git sudo
diff --git a/infrastructure/docker/build/docker-compose-opt.yml b/infrastructure/docker/build/docker-compose-opt.yml
index ac160b0..411dbc8 100644
--- a/infrastructure/docker/build/docker-compose-opt.yml
+++ b/infrastructure/docker/build/docker-compose-opt.yml
@@ -23,6 +23,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-tsb
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../../traffic_server/_tsb:/opt/tsb-ats:z
@@ -32,6 +34,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-fakeOrigin
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml
index b5190d6..35ca39e 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -30,6 +30,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-source
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -40,6 +42,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_monitor
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -50,6 +54,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_ops
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -60,6 +66,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-cache-config
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -70,6 +78,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-tc-health-client
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -80,6 +90,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_portal
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -91,6 +103,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_router
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -102,6 +116,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-traffic_stats
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -112,6 +128,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-grove
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -122,6 +140,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-grovetccfg
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
@@ -132,6 +152,8 @@ services:
       dockerfile: infrastructure/docker/build/Dockerfile-docs
       context: ../../..
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     volumes:
       - ../../..:/trafficcontrol:z
diff --git a/pkg b/pkg
index fc68d2e..5676c3a 100755
--- a/pkg
+++ b/pkg
@@ -157,7 +157,7 @@ PROJECTS="$("${COMPOSECMD[@]}" -f $COMPOSE_FILE config --services)"
 HELP_TEXT="$(cat <<HELP_TEXT
 Usage: $SELF [options] [projects]
   -7           Build RPMs targeting CentOS 7
-  -8           Build RPMs targeting CentOS 8 (default)
+  -8           Build RPMs targeting Rocky Linux 8 (default)
   -a           Build all projects, including optional ones.
   -b           Build builder Docker images before building projects
   -d           Disable compiler optimizations for debugging.
diff --git a/traffic_monitor/tests/_integration/Dockerfile b/traffic_monitor/tests/_integration/Dockerfile
index 4f8e835..c484af8 100644
--- a/traffic_monitor/tests/_integration/Dockerfile
+++ b/traffic_monitor/tests/_integration/Dockerfile
@@ -20,7 +20,7 @@
 # It doesn't do any of the complex things the Dockerfiles in infrastructure/docker or infrastructure/cdn-in-a-box do, like inserting itself into Traffic Ops.
 # It is designed for a very simple use case, where the complex orchestration of other Traffic Control components is done elsewhere (or manually).
 
-FROM centos:8
+FROM rockylinux:8
 MAINTAINER dev@trafficcontrol.apache.org
 
 RUN dnf install -y initscripts epel-release golang glibc jq git
diff --git a/traffic_monitor/tests/_integration/tm/Dockerfile b/traffic_monitor/tests/_integration/tm/Dockerfile
index cdad32c..c35cbe0 100644
--- a/traffic_monitor/tests/_integration/tm/Dockerfile
+++ b/traffic_monitor/tests/_integration/tm/Dockerfile
@@ -20,7 +20,7 @@
 # It doesn't do any of the complex things the Dockerfiles in infrastructure/docker or infrastructure/cdn-in-a-box do, like inserting itself into Traffic Ops.
 # It is designed for a very simple use case, where the complex orchestration of other Traffic Control components is done elsewhere (or manually).
 
-FROM centos:8
+FROM rockylinux:8
 MAINTAINER dev@trafficcontrol.apache.org
 
 ARG RPM=traffic_monitor.rpm
diff --git a/traffic_monitor/tools/testcaches/Dockerfile b/traffic_monitor/tools/testcaches/Dockerfile
index 595e8da..853a918 100644
--- a/traffic_monitor/tools/testcaches/Dockerfile
+++ b/traffic_monitor/tools/testcaches/Dockerfile
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM centos:8
+FROM rockylinux:8
 MAINTAINER dev@trafficcontrol.apache.org
 
 RUN dnf -y install golang git
diff --git a/traffic_monitor/tools/testto/Dockerfile b/traffic_monitor/tools/testto/Dockerfile
index 52b4bad..c779cdd 100644
--- a/traffic_monitor/tools/testto/Dockerfile
+++ b/traffic_monitor/tools/testto/Dockerfile
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM centos:8
+FROM rockylinux:8
 MAINTAINER dev@trafficcontrol.apache.org
 
 RUN dnf -y install golang git
diff --git a/traffic_server/_tsb/Dockerfile b/traffic_server/_tsb/Dockerfile
index 9729825..524b683 100644
--- a/traffic_server/_tsb/Dockerfile
+++ b/traffic_server/_tsb/Dockerfile
@@ -16,23 +16,23 @@
 # under the License.
 #
 # SPDX-License-Identifier: Apache-2.0
-ARG RHEL_VERSION=8
-FROM centos:${RHEL_VERSION} as ats-common-dependencies
+    # Change BASE_IMAGE to centos when RHEL_VERSION=7
+ARG BASE_IMAGE=rockylinux \
+    RHEL_VERSION=8
+FROM ${BASE_IMAGE}:${RHEL_VERSION} as ats-common-dependencies
 ARG RHEL_VERSION=8
 
 MAINTAINER dev@trafficcontrol.apache.org
 
 ### Common for all sub-component builds
 RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
-		rpm_gpg_key=RPM-GPG-KEY-centosofficial; \
 		yum install -y 'dnf-command(config-manager)'; \
 		yum config-manager --set-enabled powertools; \
 	else \
-		rpm_gpg_key="RPM-GPG-KEY-CentOS-${RHEL_VERSION%%.*}"; \
 		yum install -y deltarpm centos-release-scl-rh; \
 		yum-config-manager --enable rhel-server-rhscl-7-rpms; \
 	fi && \
-	rpm --import "/etc/pki/rpm-gpg/${rpm_gpg_key}" && \
+	rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
 	rpm --import "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-${RHEL_VERSION%%.*}" && \
 	yum -y clean all && \
 	yum -y update ca-certificates && \
diff --git a/traffic_server/_tsb/docker-compose.yml b/traffic_server/_tsb/docker-compose.yml
index c591163..6467a58 100644
--- a/traffic_server/_tsb/docker-compose.yml
+++ b/traffic_server/_tsb/docker-compose.yml
@@ -22,6 +22,8 @@ services:
       context: .
       dockerfile: Dockerfile
       args:
+        # Change BASE_IMAGE to centos when RHEL_VERSION=7
+        BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
         RHEL_VERSION: ${RHEL_VERSION:-8}
     image: ats_build
     volumes: