Use CentOS repo for RHEL installation (#6069)

This commit is contained in:
Shrikant Sharat Kandula 2021-07-22 15:27:34 +05:30 committed by GitHub
parent ee1c624426
commit be80609c11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,12 @@ install_docker() {
else
yum_cmd="sudo yum --assumeyes --quiet"
$yum_cmd install yum-utils
sudo yum-config-manager --add-repo "https://download.docker.com/linux/$os/docker-ce.repo"
os_in_repo_link="$os"
if [[ $os == rhel ]]; then
# For RHEL, there's no separate repo link. We can use the CentOS one though.
os_in_repo_link=centos
fi
sudo yum-config-manager --add-repo "https://download.docker.com/linux/$os_in_repo_link/docker-ce.repo"
echo "Installing docker"
$yum_cmd install docker-ce docker-ce-cli containerd.io