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/05 21:32:46 UTC

[GitHub] [trafficcontrol] zrhoffman opened a new pull request #5252: Update CDN in a Box to CentOS 8

zrhoffman opened a new pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252


   <!--
   ************ STOP!! ************
   If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
   -->
   ## What does this PR (Pull Request) do?
   <!-- Explain the changes you made here. If this fixes an Issue, identify it by
   replacing the text in the checkbox item with the Issue number e.g.
   
   - [x] This PR fixes #9001 OR is not related to any Issue
   
   ^ This will automatically close Issue number 9001 when the Pull Request is
   merged (The '#' is important).
   
   Be sure you check the box properly, see the "The following criteria are ALL
   met by this PR" section for details.
   -->
   
   - [x] This PR is not related to any Issue<!-- You can check for an issue here: https://github.com/apache/trafficcontrol/issues -->
   
   This PR bases the CDN in a Box Docker images off of CentOS 8 by default but allows users to continue to use CentOS 7 if they want by specifying the `CENTOS_VERSION` `docker-compose` build arg.
   
   ## Which Traffic Control components are affected by this PR?
   <!-- Please delete all components from this list that are NOT affected by this
   Pull Request. Also, feel free to add the name of a tool or script that is
   affected but not on the list.
   
   Additionally, if this Pull Request does NOT affect documentation, please
   explain why documentation is not required. -->
   
   - CDN in a Box
   - Documentation
   
   ## What is the best way to verify this PR?
   <!-- Please include here ALL the steps necessary to test your Pull Request. If
   it includes tests (and most should), outline here the steps needed to run the
   tests. If not, lay out the manual testing procedure and please explain why
   tests are unnecessary for this Pull Request. -->
   * Build and run CDN in a Box normally, make sure it works.
     ```shell script
     export DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1
     docker-compose build --parallel
     docker-compose down -v
     docker-compose up
     ```
   
   * Build and run CDN in a Box with CentOS 7 images, make sure it works.
     ```shell script
     export DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1
     docker-compose build --parallel --build-arg CENTOS_VERSION=7
     docker-compose down -v
     docker-compose up
     ```
   
   ## The following criteria are ALL met by this PR
   <!-- Check the boxes to signify that the associated statement is true. To
   "check a box", replace the space inside of the square brackets with an 'x'.
   e.g.
   
   - [ x] <- Wrong
   - [x ] <- Wrong
   - [] <- Wrong
   - [*] <- Wrong
   - [x] <- Correct!
   
   -->
   
   - [x] This PR changes CDN-in-a-Box, which is a test
   - [x] This PR includes documentation
   - [x] This PR includes an update to CHANGELOG.md
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->
   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r524747944



##########
File path: 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

Review comment:
       fair enough, but there are multi-stage builds where I think it's doing something like:
   ```dockerfile
   ARG CENTOS_VERSION=8
   FROM centos:${CENTOS_VERSION}
   ARG CENTOS_VERSION=8
   # ...
   ENV CENTOS_VERSION=${CENTOS_VERSION}
   ```
   could you instead do
   ```dockerfile
   ARG CENTOS_VERSION=8
   ENV CENTOS_VERSION=${CENTOS_VERSION}
   FROM centos:${CENTOS_VERSION}
   ```
   ?




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#issuecomment-723399098


   Depends on #5262, drafting for now


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r524801841



##########
File path: 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

Review comment:
       right, right, you just said that. Alright, then nevermind.




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r524736078



##########
File path: 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

Review comment:
       It's not a duplicate `ARG`. `ARG` is the only Dockerfile instruction that is allowed before `FROM`, and in order to pull the image `centos:${CENTOS_VERSION}` where `CENTOS_VERSION` is a build arg, `ARG` needs to go before `FROM`.
   
   However, build args (unlike environment variables) are not accessible in build stages after the one where the build arg is declared. So, in order to be able to use `CENTOS_VERSION` *after* the `FROM` instruction, a second `ARG` instruction is required for `CENTOS_VERSION`.




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#issuecomment-723158756


   Fixed a file permissions issue in 9b7751cd2d. PR is ready for review.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#issuecomment-724355584


   Rebased to fix a merge conflict in the changelog


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#issuecomment-723201626


   Rebased to resolve merge conflicts


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r524753211



##########
File path: 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

Review comment:
       Nope because `ENV` cannot come before the first `FROM`. If it does, you'll get an error like `No build stage in current context`.
   
   From [the documentation](https://docs.docker.com/engine/reference/builder/#from):
   > - `ARG` is the only instruction that may precede `FROM` in the `Dockerfile`.
     See [Understand how ARG and FROM interact](https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact).




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
zrhoffman commented on pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#issuecomment-724224211


   Undrafted, #5252 is ready for review.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on a change in pull request #5252:
URL: https://github.com/apache/trafficcontrol/pull/5252#discussion_r524716553



##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG

##########
File path: 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

Review comment:
       duplicate ARG




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org