You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/11/09 22:01:06 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #5252: Update CDN in a Box to CentOS 8

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



##########
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:
       Not only is this not based on CentOS, it's also not a Mid-Tier Cache - so that should just be deleted instead of updated.

##########
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:
       will this work with minor versions, e.g. 7.2? There's no EL-7.2




----------------------------------------------------------------
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:
users@infra.apache.org