zrhoffman commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r520172768



##########
File path: infrastructure/cdn-in-a-box/origin/Dockerfile
##########
@@ -18,7 +18,7 @@
 ############################################################
 # Dockerfile to build Mid-Tier Cache container images for
 # Apache Traffic Control
-# Based on CentOS 7.2
+# Based on CentOS 8

Review comment:
       Removed that line in adec98984f

##########
File path: 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" == 7* ]]; then \
+        yum -y install dnf || exit 1; \
+    fi
+
+RUN set -o nounset -o errexit && \
+    mkdir -p /etc/cron.d; \
+    if [[ "$CENTOS_VERSION" == 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";;
 \

Review comment:
       Stripping away minor version, if it's specified, in f2feec20fe




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to