You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by oc...@apache.org on 2020/11/18 17:26:26 UTC

[trafficcontrol] 04/09: Update CDN in a Box to CentOS 8 (#5252)

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

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

commit c93bc76b03f6244fdbe7a3bb0a6d79ead644d4a5
Author: Zach Hoffman <zr...@apache.org>
AuthorDate: Mon Nov 16 17:21:32 2020 -0700

    Update CDN in a Box to CentOS 8 (#5252)
    
    * Use CentOS 8 for CDN-in-a-Box images by default
    
    * Use dnf instead of yum
    
    * If on CentOS 8, enable additional repositories before trying to install
    packages
    
    * Install python3 packages, not python36
    
    * Specify additional packages to install that would have been
    automatically installed on CentOS 7
    
    * Use Traffic Server built for CentOS 7 on CentOS 8
    
    * Update for openssl 1.1: Open permissions on generated certs
    
    * We only need certs to be world-readable, not world-writable
    
    * Alpine Linux is not based on CentOS
    
    * Strip potential minor version from CENTOS_VERSION before using in repo RPM URL
    
    * Make Traffic Portal UI tests Dockerfile CentOS 8-compatible
    
    * More reliable way of deriving major version from CENTOS_VERSION that
    will work with CentOS 10
    
    (cherry picked from commit a4a87000c5b4a5ec26dc5ec1fd911dc58d1e0cd8)
---
 .github/workflows/ciab.yaml                        |  4 +-
 CHANGELOG.md                                       |  1 +
 docs/source/admin/quick_howto/ciab.rst             | 17 +++--
 docs/source/admin/traffic_monitor.rst              |  2 +-
 docs/source/admin/traffic_ops.rst                  |  2 +-
 docs/source/admin/traffic_router.rst               |  2 +-
 infrastructure/cdn-in-a-box/Makefile               |  2 +-
 infrastructure/cdn-in-a-box/README.md              |  2 +-
 .../docker-compose.traffic-portal-test.yml         |  2 +
 infrastructure/cdn-in-a-box/docker-compose.yml     |  7 ++
 infrastructure/cdn-in-a-box/edge/Dockerfile        | 89 ++++++++++++++++++++--
 infrastructure/cdn-in-a-box/mid/Dockerfile         | 89 ++++++++++++++++++++--
 .../optional/docker-compose.socksproxy.yml         |  2 +
 .../cdn-in-a-box/optional/docker-compose.vnc.yml   |  1 +
 .../cdn-in-a-box/optional/socksproxy/Dockerfile    | 16 ++--
 .../cdn-in-a-box/optional/vnc/Dockerfile           | 15 +++-
 infrastructure/cdn-in-a-box/origin/Dockerfile      |  1 -
 .../cdn-in-a-box/ort/traffic_ops_ort/packaging.py  |  4 +-
 .../cdn-in-a-box/traffic_monitor/Dockerfile        | 16 ++--
 .../cdn-in-a-box/traffic_monitor/Dockerfile-debug  | 15 +++-
 infrastructure/cdn-in-a-box/traffic_ops/Dockerfile | 41 +++++++---
 .../cdn-in-a-box/traffic_ops/Dockerfile-debug      |  2 +-
 .../cdn-in-a-box/traffic_ops/Dockerfile-go         | 30 +++++---
 .../cdn-in-a-box/traffic_ops/Dockerfile-go-debug   | 15 +++-
 infrastructure/cdn-in-a-box/traffic_ops/run.sh     |  6 +-
 .../cdn-in-a-box/traffic_portal/Dockerfile         | 16 ++--
 .../traffic_portal_integration_test/Dockerfile     | 29 +++++--
 .../cdn-in-a-box/traffic_router/Dockerfile         | 19 +++--
 .../cdn-in-a-box/traffic_stats/Dockerfile          | 14 +++-
 .../cdn-in-a-box/traffic_stats/Dockerfile-debug    | 15 +++-
 30 files changed, 376 insertions(+), 100 deletions(-)

diff --git a/.github/workflows/ciab.yaml b/.github/workflows/ciab.yaml
index d8dc16e..aab60b3 100644
--- a/.github/workflows/ciab.yaml
+++ b/.github/workflows/ciab.yaml
@@ -212,7 +212,7 @@ jobs:
           path: ${{ github.workspace }}/dist/
       - name: Cache Perl modules
         env:
-          CENTOS_VERSION: 7
+          CENTOS_VERSION: 8
         uses: actions/cache@v2
         with:
           path: ${{ github.workspace }}/infrastructure/cdn-in-a-box/traffic_ops/local
@@ -223,7 +223,7 @@ jobs:
             ${{ runner.os }}-cpan-centos-${{ env.CENTOS_VERSION }}-
       - name: Build CDN-in-a-Box images
         env:
-          CENTOS_VERSION: 7
+          CENTOS_VERSION: 8
         uses: ./.github/actions/build-ciab
       - name: Start CDN-in-a-Box
         uses: ./.github/actions/run-ciab
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5d14fd9..07861c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -158,6 +158,7 @@ will be returned indicating that overlap exists.
 - Changed certificate loading code in Traffic Router to use Bouncy Castle instead of deprecated Sun libraries.
 - Changed deprecated AsyncHttpClient Java dependency to use new active mirror and updated to version 2.12.1.
 - Changed Traffic Portal to use the more performant and powerful ag-grid for the delivery service request (DSR) table.
+- Updated CDN in a Box to CentOS 8 and added `CENTOS_VERSION` Docker build arg so CDN in a Box can be built for CentOS 7, if desired
 
 ### Deprecated
 - Deprecated the non-nullable `DeliveryService` Go struct and other structs that use it. `DeliveryServiceNullable` structs should be used instead.
diff --git a/docs/source/admin/quick_howto/ciab.rst b/docs/source/admin/quick_howto/ciab.rst
index 8368c72..0f135ca 100644
--- a/docs/source/admin/quick_howto/ciab.rst
+++ b/docs/source/admin/quick_howto/ciab.rst
@@ -38,12 +38,19 @@ The CDN in a Box directory is found within the Traffic Control repository at :fi
 
 .. note:: These can also be specified via the ``RPM`` variable to a direct Docker build of the component - with the exception of Traffic Router, which instead accepts ``JDK8_RPM`` to specify a Java Development Kit RPM,  ``TRAFFIC_ROUTER_RPM`` to specify a Traffic Router RPM, and  ``TOMCAT_RPM`` to specify an Apache Tomcat RPM.
 
-These can all be supplied manually via the steps in :ref:`dev-building` (for Traffic Control component RPMs) or via some external source. Alternatively, the :file:`infrastructure/cdn-in-a-box/Makefile` file contains recipes to build all of these - simply run :manpage:`make(1)` from the :file:`infrastructure/cdn-in-a-box/` directory. Once all RPM dependencies have been satisfied, run ``docker-compose build`` from the :file:`infrastructure/cdn-in-a-box/` directory to construct the images n [...]
+These can all be supplied manually via the steps in :ref:`dev-building` (for Traffic Control component RPMs) or via some external source. Alternatively, the :file:`infrastructure/cdn-in-a-box/Makefile` file contains recipes to build all of these - simply run :manpage:`make(1)` from the :file:`infrastructure/cdn-in-a-box/` directory. Once all RPM dependencies have been satisfied, run ``docker-compose build --parallel`` from the :file:`infrastructure/cdn-in-a-box/` directory to construct t [...]
 
 .. tip:: If you have gone through the steps to :ref:`dev-building-natively`, you can run ``make native`` instead of ``make`` to build the RPMs quickly. Another option is running ``make -j4`` to build 4 components at once, if your computer can handle it.
 
 .. 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 ``CENTOS_VERSION`` `build arg <https://docs.docker.com/engine/reference/builder/#arg>`_ to ``7`` (it defaults to ``8``):
+
+.. code-block:: shell
+	:caption: Building CDN in a Box to run CentOS 7 instead of CentOS 8
+
+	docker-compose build --parallel --build-arg CENTOS_VERSION=7
+
 The image that takes the takes the longest to build is the ``trafficops-perl`` image. In order to avoid needing to download, build, and test 239 Perl CPAN modules each time you rebuild the image from scratch, you can run the following command while running CDN in a Box in order to skip building the Perl modules next time:
 
 .. code-block:: shell
@@ -200,14 +207,14 @@ 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 Linux/Centos7
------------------------------------------------------------------------------
+Importing the :abbr:`CA (Certificate Authority)` certificate on CentOS 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).
 
-Importing the :abbr:`CA (Certificate Authority)` certificate on Linux/Ubuntu
-----------------------------------------------------------------------------
+Importing the :abbr:`CA (Certificate Authority)` certificate on Ubuntu (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:`/usr/local/share/ca-certificates/`.
 #. Run ``update-ca-certificates`` as the root user or with :manpage:`sudo(8)`.
 #. Restart all HTTPS clients (browsers, etc).
diff --git a/docs/source/admin/traffic_monitor.rst b/docs/source/admin/traffic_monitor.rst
index 832eece..a349107 100644
--- a/docs/source/admin/traffic_monitor.rst
+++ b/docs/source/admin/traffic_monitor.rst
@@ -23,7 +23,7 @@ Installing Traffic Monitor
 ==========================
 The following are hard requirements requirements for Traffic Monitor to operate:
 
-* CentOS 7+
+* CentOS 7 or later
 * Successful install of Traffic Ops (usually on a separate machine)
 * Administrative access to the Traffic Ops (usually on a separate machine)
 
diff --git a/docs/source/admin/traffic_ops.rst b/docs/source/admin/traffic_ops.rst
index 613018f..9f2ff3b 100644
--- a/docs/source/admin/traffic_ops.rst
+++ b/docs/source/admin/traffic_ops.rst
@@ -30,7 +30,7 @@ System Requirements
 -------------------
 The user must have the following for a successful minimal install:
 
-- CentOS 7+
+- CentOS 7 or later
 - Two machines - physical or virtual -, each with at least two (v)CPUs, 4GB of RAM, and 20 GB of disk space
 - Access to CentOS Base and EPEL :manpage:`yum(8)` repositories
 - Access to `The Comprehensive Perl Archive Network (CPAN) <http://www.cpan.org/>`_
diff --git a/docs/source/admin/traffic_router.rst b/docs/source/admin/traffic_router.rst
index a4b67af..95f081c 100644
--- a/docs/source/admin/traffic_router.rst
+++ b/docs/source/admin/traffic_router.rst
@@ -21,7 +21,7 @@ Traffic Router Administration
 
 Requirements
 ============
-* CentOS 7
+* CentOS 7 or later
 * 4 CPUs
 * 8GB of RAM
 * Successful install of Traffic Ops (usually on another machine)
diff --git a/infrastructure/cdn-in-a-box/Makefile b/infrastructure/cdn-in-a-box/Makefile
index 176aa87..94d3a8c 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 7.2
+# Based on CentOS 8
 ############################################################
 
 # Check for proper invocation
diff --git a/infrastructure/cdn-in-a-box/README.md b/infrastructure/cdn-in-a-box/README.md
index b16ba09..6623c0e 100644
--- a/infrastructure/cdn-in-a-box/README.md
+++ b/infrastructure/cdn-in-a-box/README.md
@@ -30,7 +30,7 @@ minimal CDN for full system testing.
 The containers run on Docker, and require Docker (tested v17.05.0-ce) and Docker
 Compose (tested v1.9.0) to build and run. On most 'nix systems these can be installed
 via the distribution's package manager under the names `docker-ce` and
-`docker-compose`, respectively (e.g. `sudo yum install docker-ce`).
+`docker-compose`, respectively (e.g. `sudo dnf install docker-ce`).
 
 Each container (except the origin) requires an `.rpm` file to install the Traffic Control
 component for which it is responsible. You can download these `*.rpm` files from an archive
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 89b0c03..f285029 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
@@ -31,6 +31,8 @@ services:
     build:
       context: ../..
       dockerfile: infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
+      args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
     env_file:
       - variables.env
     hostname: portal-integration
diff --git a/infrastructure/cdn-in-a-box/docker-compose.yml b/infrastructure/cdn-in-a-box/docker-compose.yml
index 9fd186c..a78c52b 100644
--- a/infrastructure/cdn-in-a-box/docker-compose.yml
+++ b/infrastructure/cdn-in-a-box/docker-compose.yml
@@ -59,6 +59,7 @@ services:
       context: .
       dockerfile: traffic_ops/Dockerfile-go
       args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
         TRAFFIC_OPS_RPM: traffic_ops/traffic_ops.rpm
     depends_on:
       - db
@@ -80,6 +81,7 @@ services:
       context: ../..
       dockerfile: infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
       args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
         TRAFFIC_OPS_RPM: infrastructure/cdn-in-a-box/traffic_ops/traffic_ops.rpm
     depends_on:
       - db
@@ -101,6 +103,7 @@ services:
       context: .
       dockerfile: traffic_portal/Dockerfile
       args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
         TRAFFIC_PORTAL_RPM: traffic_portal/traffic_portal.rpm
     depends_on:
       - enroller
@@ -118,6 +121,7 @@ services:
       context: .
       dockerfile: traffic_monitor/Dockerfile
       args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
         TRAFFIC_MONITOR_RPM: traffic_monitor/traffic_monitor.rpm
     depends_on:
       - enroller
@@ -135,6 +139,7 @@ services:
       context: .
       dockerfile: traffic_router/Dockerfile
       args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
         TRAFFIC_ROUTER_RPM: traffic_router/traffic_router.rpm
         TOMCAT_RPM: traffic_router/tomcat.rpm
     depends_on:
@@ -151,6 +156,8 @@ services:
     build:
       context: .
       dockerfile: traffic_stats/Dockerfile
+      args:
+        CENTOS_VERSION: ${CENTOS_VERSION:-8}
     image: trafficstats
     depends_on:
       - enroller
diff --git a/infrastructure/cdn-in-a-box/edge/Dockerfile b/infrastructure/cdn-in-a-box/edge/Dockerfile
index fc0f798..9ab0579 100644
--- a/infrastructure/cdn-in-a-box/edge/Dockerfile
+++ b/infrastructure/cdn-in-a-box/edge/Dockerfile
@@ -18,21 +18,98 @@
 ############################################################
 # Dockerfile to build Edge-Tier Cache container images for
 # Apache Traffic Control
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
-FROM centos:7 AS common-cache-server-layers
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} AS common-cache-server-layers
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 EXPOSE 80
 
+RUN dnf -y install epel-release && \
+    if [[ "${CENTOS_VERSION%%.*}" -ge 8 ]]; then \
+        additional_packages='compat-openssl10 pkgconf-pkg-config' || \
+        exit 1; \
+    else \
+        additional_packages=openssl || \
+        exit 1; \
+    fi && \
+    dnf -y install              \
+        GeoIP                   \
+        groff-base              \
+        hwloc                   \
+        hwloc-libs              \
+        kyotocabinet-libs       \
+        libtool-ltdl            \
+        libunwind               \
+        lzo                     \
+        make                    \
+        numactl-libs            \
+        perl                    \
+        perl-Carp               \
+        perl-constant           \
+        perl-Data-Dumper        \
+        perl-Encode             \
+        perl-Exporter           \
+        perl-File-Path          \
+        perl-File-Temp          \
+        perl-Filter             \
+        perl-Getopt-Long        \
+        perl-HTTP-Tiny          \
+        perl-libs               \
+        perl-macros             \
+        perl-parent             \
+        perl-PathTools          \
+        perl-Pod-Escapes        \
+        perl-podlators          \
+        perl-Pod-Perldoc        \
+        perl-Pod-Simple         \
+        perl-Pod-Usage          \
+        perl-Scalar-List-Utils  \
+        perl-Socket             \
+        perl-Storable           \
+        perl-Text-ParseWords    \
+        perl-threads            \
+        perl-threads-shared     \
+        perl-Time-HiRes         \
+        perl-Time-Local         \
+        perl-URI                \
+        tcl                     \
+        $additional_packages && \
+    if [[ "${CENTOS_VERSION%%.*}" -eq 8 ]]; then \
+        set -- \
+            # Pretend that we have the right library versions.
+            # TODO: Use a proper CentOS 7 or 8 RPM once trafficserver
+            # is in EPEL again (see apache/trafficserver#6855)
+            libtcl8.6.so        libtcl8.5.so     \
+            libncursesw.so.6    libncursesw.so.5 \
+            libtinfo.so.6       libtinfo.so.5    \
+            || exit 1; \
+    fi && \
+    cd /usr/lib64 && \
+    while [[ $# -gt 0 ]]; do \
+        source="$1" && \
+        shift && \
+        target="$1" && \
+        shift && \
+        ln -s "$source" "$target" || exit 1; \
+    done
 
 ADD https://ci.trafficserver.apache.org/RPMS/CentOS7/trafficserver-7.1.4-2.el7.x86_64.rpm /trafficserver.rpm
 ADD https://ci.trafficserver.apache.org/RPMS/CentOS7/trafficserver-devel-7.1.4-2.el7.x86_64.rpm /trafficserver-devel.rpm
 
-RUN yum install -y bind-utils kyotocabinet-libs epel-release initscripts iproute net-tools nmap-ncat gettext autoconf automake libtool gcc-c++ cronie glibc-devel openssl-devel
-RUN yum install -y /trafficserver.rpm /trafficserver-devel.rpm jq python36-psutil python36-typing python36-setuptools python36-pip logrotate && yum clean all
-RUN python3 -m pip install --upgrade pip && python3 -m pip install requests urllib3 distro
+RUN rpm -Uvh --nodeps /trafficserver.rpm /trafficserver-devel.rpm && \
+    dnf install -y jq python3-psutil python3-setuptools python3-pip logrotate && \
+    dnf clean all
 
+RUN dnf install -y bind-utils kyotocabinet-libs initscripts iproute net-tools nmap-ncat gettext autoconf automake libtool gcc-c++ cronie glibc-devel openssl-devel
+
+RUN python3 -m pip install --upgrade pip && python3 -m pip install requests urllib3 distro
 
 ADD traffic_server/plugins/astats_over_http/astats_over_http.c traffic_server/plugins/astats_over_http/Makefile.am /
 
@@ -41,7 +118,7 @@ RUN tsxs -v -c astats_over_http.c -o astats_over_http.so
 # The symbolic link here is a shim for broken atstccfg behavior - remove when it's fixed.
 RUN mkdir -p /usr/libexec/trafficserver /opt/ort /opt/trafficserver/etc/trafficserver/ /opt/init.d && ln -s /opt/trafficserver/etc/trafficserver/ssl /etc/trafficserver/ssl && tsxs -v -o astats_over_http.so -i
 
-RUN yum remove -y gcc-c++ glibc-devel autoconf automake libtool && rm -f /astats_over_http.c /Makefile.am
+RUN dnf remove -y gcc-c++ glibc-devel autoconf automake libtool && rm -f /astats_over_http.c /Makefile.am
 
 # You need to do this because the RPM in the ATS archives is just all kinds of messed-up
 RUN chmod 755 /usr/lib64/trafficserver /etc/trafficserver/body_factory /etc/trafficserver/body_factory/default
diff --git a/infrastructure/cdn-in-a-box/mid/Dockerfile b/infrastructure/cdn-in-a-box/mid/Dockerfile
index 046321a..d72f5ad 100644
--- a/infrastructure/cdn-in-a-box/mid/Dockerfile
+++ b/infrastructure/cdn-in-a-box/mid/Dockerfile
@@ -18,21 +18,98 @@
 ############################################################
 # Dockerfile to build Edge-Tier Cache container images for
 # Apache Traffic Control
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
-FROM centos:7 AS common-cache-server-layers
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} AS common-cache-server-layers
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 EXPOSE 80
 
+RUN dnf -y install epel-release && \
+    if [[ "${CENTOS_VERSION%%.*}" -ge 8 ]]; then \
+        additional_packages='compat-openssl10 pkgconf-pkg-config' || \
+        exit 1; \
+    else \
+        additional_packages=openssl || \
+        exit 1; \
+    fi && \
+    dnf -y install              \
+        GeoIP                   \
+        groff-base              \
+        hwloc                   \
+        hwloc-libs              \
+        kyotocabinet-libs       \
+        libtool-ltdl            \
+        libunwind               \
+        lzo                     \
+        make                    \
+        numactl-libs            \
+        perl                    \
+        perl-Carp               \
+        perl-constant           \
+        perl-Data-Dumper        \
+        perl-Encode             \
+        perl-Exporter           \
+        perl-File-Path          \
+        perl-File-Temp          \
+        perl-Filter             \
+        perl-Getopt-Long        \
+        perl-HTTP-Tiny          \
+        perl-libs               \
+        perl-macros             \
+        perl-parent             \
+        perl-PathTools          \
+        perl-Pod-Escapes        \
+        perl-podlators          \
+        perl-Pod-Perldoc        \
+        perl-Pod-Simple         \
+        perl-Pod-Usage          \
+        perl-Scalar-List-Utils  \
+        perl-Socket             \
+        perl-Storable           \
+        perl-Text-ParseWords    \
+        perl-threads            \
+        perl-threads-shared     \
+        perl-Time-HiRes         \
+        perl-Time-Local         \
+        perl-URI                \
+        tcl                     \
+        $additional_packages && \
+    if [[ "${CENTOS_VERSION%%.*}" -eq 8 ]]; then \
+        set -- \
+            # Pretend that we have the right library versions.
+            # TODO: Use a proper CentOS 7 or 8 RPM once trafficserver
+            # is in EPEL again (see apache/trafficserver#6855)
+            libtcl8.6.so        libtcl8.5.so     \
+            libncursesw.so.6    libncursesw.so.5 \
+            libtinfo.so.6       libtinfo.so.5    \
+            || exit 1; \
+    fi && \
+    cd /usr/lib64 && \
+    while [[ $# -gt 0 ]]; do \
+        source="$1" && \
+        shift && \
+        target="$1" && \
+        shift && \
+        ln -s "$source" "$target" || exit 1; \
+    done
 
 ADD https://ci.trafficserver.apache.org/RPMS/CentOS7/trafficserver-7.1.4-2.el7.x86_64.rpm /trafficserver.rpm
 ADD https://ci.trafficserver.apache.org/RPMS/CentOS7/trafficserver-devel-7.1.4-2.el7.x86_64.rpm /trafficserver-devel.rpm
 
-RUN yum install -y bind-utils kyotocabinet-libs epel-release initscripts iproute net-tools nmap-ncat gettext autoconf automake libtool gcc-c++ cronie glibc-devel openssl-devel
-RUN yum install -y /trafficserver.rpm /trafficserver-devel.rpm jq python36-psutil python36-typing python36-setuptools python36-pip logrotate && yum clean all
-RUN python3 -m pip install --upgrade pip && python3 -m pip install requests urllib3 distro
+RUN rpm -Uvh --nodeps /trafficserver.rpm /trafficserver-devel.rpm && \
+    dnf install -y jq python3-psutil python3-setuptools python3-pip logrotate && \
+    dnf clean all
 
+RUN dnf install -y bind-utils kyotocabinet-libs initscripts iproute net-tools nmap-ncat gettext autoconf automake libtool gcc-c++ cronie glibc-devel openssl-devel
+
+RUN python3 -m pip install --upgrade pip && python3 -m pip install requests urllib3 distro
 
 ADD traffic_server/plugins/astats_over_http/astats_over_http.c traffic_server/plugins/astats_over_http/Makefile.am /
 
@@ -41,7 +118,7 @@ RUN tsxs -v -c astats_over_http.c -o astats_over_http.so
 # The symbolic link here is a shim for broken atstccfg behavior - remove when it's fixed.
 RUN mkdir -p /usr/libexec/trafficserver /opt/ort /opt/trafficserver/etc/trafficserver/ /opt/init.d && ln -s /opt/trafficserver/etc/trafficserver/ssl /etc/trafficserver/ssl && tsxs -v -o astats_over_http.so -i
 
-RUN yum remove -y gcc-c++ glibc-devel autoconf automake libtool && rm -f /astats_over_http.c /Makefile.am
+RUN dnf remove -y gcc-c++ glibc-devel autoconf automake libtool && rm -f /astats_over_http.c /Makefile.am
 
 # You need to do this because the RPM in the ATS archives is just all kinds of messed-up
 RUN chmod 755 /usr/lib64/trafficserver /etc/trafficserver/body_factory /etc/trafficserver/body_factory/default
diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml
index f98a04b..11d15de 100644
--- a/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml
+++ b/infrastructure/cdn-in-a-box/optional/docker-compose.socksproxy.yml
@@ -44,6 +44,8 @@ services:
     build:
       context: .
       dockerfile: optional/socksproxy/Dockerfile
+      args:
+        CENTOS_VERSION: 8
     hostname: socksproxy
     domainname: infra.ciab.test
     volumes:
diff --git a/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml b/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml
index 5bc395f..0b26682 100644
--- a/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml
+++ b/infrastructure/cdn-in-a-box/optional/docker-compose.vnc.yml
@@ -48,6 +48,7 @@ services:
       context: .
       dockerfile: optional/vnc/Dockerfile
       args:
+        CENTOS_VERSION: 8
         VNC_BUILD_USER: "ciabuser"
     depends_on:
       - dns
diff --git a/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile b/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile
index e0d91e8..01e21d4 100644
--- a/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile
+++ b/infrastructure/cdn-in-a-box/optional/socksproxy/Dockerfile
@@ -17,13 +17,19 @@
 
 ############################################################
 # Dockerfile to build optional CiaB Socks Proxy
-# Based on CentOS 7
+# Based on CentOS 8
 ############################################################
-FROM centos:7
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 ARG DANTES_SRC=https://www.inet.no/dante/files/dante-1.4.2.tar.gz
 
-RUN yum install -y net-tools bind-utils iproute wget curl automake autoconf gcc make && \
+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\*) && \
@@ -32,8 +38,8 @@ RUN yum install -y net-tools bind-utils iproute wget curl automake autoconf gcc
     make install && \
     groupadd -g 8062 sockd  && \
     useradd -m -u 8062 -g sockd sockd && \
-    yum remove -y automake autoconf gcc make && \
-    yum clean all && \
+    dnf remove -y automake autoconf gcc make && \
+    dnf clean all && \
     rm -rf /tmp/*  
 
 COPY optional/socksproxy/sockd.conf /etc
diff --git a/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile b/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
index fa294d0..a446a8b 100644
--- a/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
+++ b/infrastructure/cdn-in-a-box/optional/vnc/Dockerfile
@@ -14,15 +14,22 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-FROM docker.io/centos:7
+
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 ARG VNC_BUILD_USER
 ENV VNC_USER=$VNC_BUILD_USER
 
-RUN yum -y install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm epel-release && \
-    yum -y install xterm firefox git tigervnc-server sudo bind-utils net-tools which passwd which \
+RUN dnf -y install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm epel-release && \
+    dnf -y install xterm firefox git tigervnc-server sudo bind-utils net-tools which passwd which \
                    fluxbox webcore-fonts terminus-fonts vnc mplayer wget openssl curl nc && \
-    yum -y clean all && rm -rf /var/cache/yum
+    dnf -y clean all && rm -rf /var/cache/dnf
 
 RUN useradd -m $VNC_USER && \
     echo "$VNC_USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
diff --git a/infrastructure/cdn-in-a-box/origin/Dockerfile b/infrastructure/cdn-in-a-box/origin/Dockerfile
index 8b8f4e4..b95fee7 100644
--- a/infrastructure/cdn-in-a-box/origin/Dockerfile
+++ b/infrastructure/cdn-in-a-box/origin/Dockerfile
@@ -18,7 +18,6 @@
 ############################################################
 # Dockerfile to build Mid-Tier Cache container images for
 # Apache Traffic Control
-# Based on CentOS 7.2
 ############################################################
 
 FROM alpine:latest
diff --git a/infrastructure/cdn-in-a-box/ort/traffic_ops_ort/packaging.py b/infrastructure/cdn-in-a-box/ort/traffic_ops_ort/packaging.py
index 7d15dbc..a570103 100644
--- a/infrastructure/cdn-in-a-box/ort/traffic_ops_ort/packaging.py
+++ b/infrastructure/cdn-in-a-box/ort/traffic_ops_ort/packaging.py
@@ -48,8 +48,8 @@ class _MetaPackage(type):
 			                                                     stdout=subprocess.PIPE)
 			                                              .communicate()[0].decode().splitlines()
 			                                    if not p.endswith("is not installed")]
-			pack.installArgs = ["/bin/yum", "install", "-y"]
-			pack.uninstallArgs = ["/bin/yum", "remove", "-y"]
+			pack.installArgs = ["/bin/dnf", "install", "-y"]
+			pack.uninstallArgs = ["/bin/dnf", "remove", "-y"]
 
 		elif DISTRO in {'ubuntu', 'linuxmint', 'debian'}:
 			concat = '='
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
index 8c84ddd..8f37220 100644
--- a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile
@@ -19,13 +19,19 @@
 # Based on CentOS
 ############################################################
 
-FROM centos/systemd
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 # Default values for RPM -- override with `docker build --build-arg RPM=...'
 ARG RPM=traffic_monitor/traffic_monitor.rpm
 
-RUN yum install -y epel-release && \
-    yum install -y \
+RUN dnf install -y epel-release && \
+    dnf install -y \
         jq \
         nmap-ncat \
         iproute \
@@ -34,10 +40,10 @@ RUN yum install -y epel-release && \
         bind-utils \
         openssl \
         initscripts && \
-    yum clean all
+    dnf clean all
 
 ADD $RPM /
-RUN yum install -y  /$(basename $RPM) && \
+RUN rpm -Uvh  /$(basename $RPM) && \
     rm /$(basename $RPM)
 
 RUN mkdir -p /opt/traffic_monitor/conf
diff --git a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile-debug b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile-debug
index eba37e3..948c174 100644
--- a/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile-debug
+++ b/infrastructure/cdn-in-a-box/traffic_monitor/Dockerfile-debug
@@ -20,10 +20,17 @@
 # Based on CentOS
 ############################################################
 
-FROM centos/systemd as build-delve
-RUN yum -y install epel-release && \
-    yum -y install golang && \
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} as get-delve
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+RUN dnf -y install epel-release && \
+    dnf -y install golang git && \
     go get -u github.com/go-delve/delve/cmd/dlv
 
 FROM trafficmonitor
-COPY --from=build-delve /root/go/bin /usr/bin
+COPY --from=get-delve /root/go/bin /usr/bin
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
index d2154de..a675f4c 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
@@ -17,18 +17,33 @@
 
 ############################################################
 # Dockerfile to build Traffic Ops container images
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
 # Keep the trafficops-common-deps in Dockerfile the same as
 # trafficops-common-deps in Dockerfile-go to cache the same
 # layer.
-FROM centos:7 as trafficops-common-deps
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} as trafficops-common-deps
+ARG CENTOS_VERSION=8
+# Makes CENTOS_VERSION available in later layers without needing to specify it again
+ENV CENTOS_VERSION=$CENTOS_VERSION
 
-RUN mkdir /etc/cron.d && \
-    yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
-    yum -y install epel-release && \
-    yum -y install      \
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+RUN set -o nounset -o errexit && \
+    mkdir -p /etc/cron.d; \
+    if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        use_repo=''; \
+    else \
+        use_repo='--repo=pgdg96'; \
+    fi; \
+    dnf -y install "https://download.postgresql.org/pub/repos/yum/reporpms/EL-${CENTOS_VERSION%%.*}-x86_64/pgdg-redhat-repo-latest.noarch.rpm"; \
+    dnf -y $use_repo -- install postgresql96; \
+    dnf -y install epel-release; \
+    dnf -y install      \
         jq              \
         bind-utils      \
         net-tools       \
@@ -38,15 +53,19 @@ RUN mkdir /etc/cron.d && \
         isomd5sum       \
         nmap-ncat       \
         openssl         \
-        postgresql96 && \
-    yum clean all
+        # Used to copy certs in "Shared SSL certificate generation" step
+        rsync;          \
+    dnf clean all
 
 FROM trafficops-common-deps as trafficops-perl-deps
 
 EXPOSE 443
 ENV MOJO_MODE production
 
-RUN yum install -y          \
+RUN if [[ "${CENTOS_VERSION%%.*}" -ge 8 ]]; then \
+        enable_repo='--enablerepo=PowerTools' || exit 1; \
+    fi && \
+    dnf -y --allowerasing $enable_repo install \
         cpanminus           \
         expat-devel         \
         gcc-c++             \
@@ -67,13 +86,13 @@ RUN yum install -y          \
         perl-Digest-SHA1    \
         perl-JSON           \
         perl-libwww-perl    \
+        perl-Net-Pcap       \
         perl-TermReadKey    \
         perl-Test-CPAN-Meta \
         perl-WWW-Curl       \
         postgresql96-devel  \
-        postgresql96-libs   \
         tar &&              \
-    yum -y clean all && \
+    dnf -y clean all && \
     mkdir -p /opt/traffic_ops/app/public && \
     cpanm Carton
 
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-debug b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-debug
index e62b474..6f6c7e0 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-debug
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-debug
@@ -17,7 +17,7 @@
 
 ############################################################
 # Dockerfile to build Traffic Ops container images
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
 FROM trafficops-perl
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
index ff01b91..2101902 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go
@@ -17,18 +17,31 @@
 
 ############################################################
 # Dockerfile to build Traffic Ops container images
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
 # Keep the trafficops-common-deps in Dockerfile-go the same
 # as trafficops-common-deps in Dockerfile to cache the same
 # layer.
-FROM centos:7 as trafficops-common-deps
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} as trafficops-common-deps
+ARG CENTOS_VERSION=8
 
-RUN mkdir /etc/cron.d && \
-    yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
-    yum -y install epel-release && \
-    yum -y install      \
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+RUN set -o nounset -o errexit && \
+    mkdir -p /etc/cron.d; \
+    if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+	    include_repo=''; \
+    else \
+	    include_repo='--repo=pgdg96'; \
+    fi; \
+    dnf -y install "https://download.postgresql.org/pub/repos/yum/reporpms/EL-${CENTOS_VERSION%%.*}-x86_64/pgdg-redhat-repo-latest.noarch.rpm"; \
+    dnf -y $include_repo -- install postgresql96; \
+    dnf -y install epel-release; \
+    dnf -y install      \
         jq              \
         bind-utils      \
         net-tools       \
@@ -37,9 +50,8 @@ RUN mkdir /etc/cron.d && \
         mkisofs         \
         isomd5sum       \
         nmap-ncat       \
-        openssl         \
-        postgresql96 && \
-    yum clean all
+        openssl;        \
+    dnf clean all
 
 FROM    trafficops-common-deps
 
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go-debug b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go-debug
index 9f9d81d..be661d0 100644
--- a/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go-debug
+++ b/infrastructure/cdn-in-a-box/traffic_ops/Dockerfile-go-debug
@@ -17,12 +17,19 @@
 
 ############################################################
 # Dockerfile to build Traffic Ops debugging container image
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
-FROM centos:7 as get-delve
-RUN yum -y install epel-release && \
-    yum -y install golang && \
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} as get-delve
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+RUN dnf -y install epel-release && \
+    dnf -y install golang git && \
     go get -u github.com/go-delve/delve/cmd/dlv
 
 FROM trafficops-go
diff --git a/infrastructure/cdn-in-a-box/traffic_ops/run.sh b/infrastructure/cdn-in-a-box/traffic_ops/run.sh
index 1af0666..1e107a6 100755
--- a/infrastructure/cdn-in-a-box/traffic_ops/run.sh
+++ b/infrastructure/cdn-in-a-box/traffic_ops/run.sh
@@ -53,7 +53,7 @@ source /generate-certs.sh
 # copy contents of /ca to /export/ssl
 # update the permissions 
 mkdir -p "$X509_CA_PERSIST_DIR" && chmod 777 "$X509_CA_PERSIST_DIR"
-chmod -R a+rw "$X509_CA_PERSIST_DIR"
+chmod -R a+r "$X509_CA_PERSIST_DIR"
 
 if [ -r "$X509_CA_PERSIST_ENV_FILE" ] ; then
   umask $X509_CA_UMASK 
@@ -74,14 +74,14 @@ elif x509v3_init; then
 		x509v3_dump_env
     # Save newly generated certs for future restarts.
     rsync -av "$X509_CA_DIR/" "$X509_CA_PERSIST_DIR/"
-    chmod 777 "$X509_CA_PERSIST_DIR"
+    chmod -R a+r "$X509_CA_DIR/" "$X509_CA_PERSIST_DIR"
     sync
     echo "GENERATE CERTS FROM $X509_CA_DIR to $X509_CA_PERSIST_DIR"
     sleep 4
 fi
 
 chown -R trafops:trafops "$X509_CA_PERSIST_DIR"
-chmod -R a+rw "$X509_CA_PERSIST_DIR"
+chmod -R a+r "$X509_CA_PERSIST_DIR"
 
 # Write config files
 set -x
diff --git a/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile b/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
index b44c035..07a9c52 100644
--- a/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_portal/Dockerfile
@@ -17,10 +17,16 @@
 
 ############################################################
 # Dockerfile to build Traffic Portal container images
-# Based on CentOS 7.2
+# Based on CentOS 8
 ############################################################
 
-FROM centos:7
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 RUN curl -sL https://rpm.nodesource.com/setup_12.x | bash -
 
@@ -30,16 +36,16 @@ ARG TRAFFIC_PORTAL_RPM=traffic_portal/traffic_portal.rpm
 ARG TO_HOST=$TO_HOST
 
 # Install and delete the TRAFFIC_PORTAL_RPM when finished
-RUN yum install -y \
+RUN dnf install -y \
     epel-release && \
-    yum install -y \
+    dnf install -y \
       jq \
       nodejs \
       openssl \
       gettext \
       bind-utils \
       net-tools && \
-    yum clean all || \
+    dnf clean all || \
     echo "ERROR INSTALLING PACKAGES"
 
 ADD $TRAFFIC_PORTAL_RPM /
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 1910f6f..39c1cde 100644
--- a/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_portal_integration_test/Dockerfile
@@ -15,21 +15,34 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM centos:7 as os-dependencies
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} as os-dependencies
+ARG CENTOS_VERSION=8
 
-# Installs the Google Chrome yum repo
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+# Installs the Google Chrome dnf repo
 COPY infrastructure/cdn-in-a-box/traffic_portal_integration_test/etc etc
 
-RUN yum install -y \
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        utils_package=yum-utils; \
+    else \
+        utils_package=dnf-utils; \
+    fi && \
+    dnf install -y \
         bind-utils \
         # jq is in EPEL
         epel-release \
+        GConf2 \
         git \
         google-chrome-stable \
         java-1.8.0-openjdk \
-        net-tools && \
-    yum -y install jq && \
-    yum -y clean all
+        net-tools \
+        $utils_package && \
+    dnf -y install jq && \
+    dnf -y clean all
 
 FROM os-dependencies AS node-dependencies
 # Download and install node
@@ -64,8 +77,8 @@ RUN jq ' \
     mv conf.json.tmp conf.json
 
 RUN webdriver-manager clean && \
-	repoquery --installed --qf='%{version}' google-chrome-stable | \
-		xargs webdriver-manager update --versions.chrome
+    repoquery --installed --qf='%{version}' google-chrome-stable | \
+        xargs webdriver-manager update --versions.chrome
 
 COPY infrastructure/cdn-in-a-box/traffic_ops/to-access.sh \
      infrastructure/cdn-in-a-box/traffic_portal_integration_test/run.sh \
diff --git a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile
index 0eff38b..6d8bca7 100644
--- a/infrastructure/cdn-in-a-box/traffic_router/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_router/Dockerfile
@@ -16,22 +16,29 @@
 # under the License.
 ############################################################
 # Dockerfile to build Traffic Router 3.0
-# Based on CentOS 7.x
+# Based on CentOS 8
 ############################################################
 
-FROM centos:7
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
 MAINTAINER dev@trafficcontrol.apache.org
 
 # Default values for TOMCAT RPM and RPM -- override with `docker build --build-arg JDK=...'
 ARG TRAFFIC_ROUTER_RPM=traffic_router/traffic_router.rpm
 ARG TOMCAT_RPM=traffic_router/tomcat.rpm
 
-RUN yum -y install epel-release && \
-    yum -y install jq git rpm-build net-tools iproute nc wget tar unzip \
-          perl-JSON perl-WWWCurl which make autoconf automake gcc gcc-c++ apr apr-devel \
+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-1.8.0-openjdk-headless java-1.8.0-openjdk-devel tomcat-native && \
-    yum -y clean all && \
+    dnf -y clean all && \
     ln -sfv $(realpath /usr/lib/jvm/java-1.8.0) /opt/java
 
 ADD $TRAFFIC_ROUTER_RPM /traffic_router.rpm
diff --git a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
index 60a4622..a9d6c06 100644
--- a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
+++ b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile
@@ -19,20 +19,26 @@
 # Based on CentOS
 ############################################################
 
-FROM centos:7
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION}
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
 
 # Default values for RPM -- override with `docker build --build-arg RPM=...'
 ARG TRAFFIC_TS_RPM=traffic_stats/traffic_stats.rpm
 
-RUN yum install -y epel-release && \
-    yum install -y \
+RUN dnf install -y epel-release && \
+    dnf install -y \
         jq \
         nmap-ncat \
         net-tools \
         gettext \
         bind-utils \
         openssl && \
-    yum clean all
+    dnf clean all
 
 ADD $TRAFFIC_TS_RPM /
 RUN rpm -Uvh /$(basename $TRAFFIC_TS_RPM) && \
diff --git a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile-debug b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile-debug
index a5ad931..9c49f6f 100644
--- a/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile-debug
+++ b/infrastructure/cdn-in-a-box/traffic_stats/Dockerfile-debug
@@ -20,10 +20,17 @@
 # Based on CentOS
 ############################################################
 
-FROM centos/systemd as build-delve
-RUN yum -y install epel-release && \
-    yum -y install golang && \
+ARG CENTOS_VERSION=8
+FROM centos:${CENTOS_VERSION} as get-delve
+ARG CENTOS_VERSION=8
+
+RUN if [[ "${CENTOS_VERSION%%.*}" -eq 7 ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+RUN dnf -y install epel-release && \
+    dnf -y install golang git && \
     go get -u github.com/go-delve/delve/cmd/dlv
 
 FROM trafficstats
-COPY --from=build-delve /root/go/bin /usr/bin
+COPY --from=get-delve /root/go/bin /usr/bin