From d48913ccbd956902dbbee3fa51507374a9ae2c36 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Thu, 8 Nov 2018 23:29:42 +0000 Subject: [PATCH] Set to explictly disable all repos for RPM first Makes it so that the repo that's enabled is only the channel that we specify. Was the case where it'd automatically enable stable without explictly asking if we want stable enabled. Signed-off-by: Eli Uriegas --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index e052f49..553a48e 100644 --- a/install.sh +++ b/install.sh @@ -466,12 +466,14 @@ do_install() { pkg_manager="dnf" config_manager="dnf config-manager" enable_channel_flag="--set-enabled" + disable_channel_flag="--set-disabled" pre_reqs="dnf-plugins-core" pkg_suffix="fc$dist_version" else pkg_manager="yum" config_manager="yum-config-manager" enable_channel_flag="--enable" + disable_channel_flag="--disable" pre_reqs="yum-utils" pkg_suffix="el" fi @@ -483,6 +485,7 @@ do_install() { $sh_c "$config_manager --add-repo $yum_repo" if [ "$CHANNEL" != "stable" ]; then + $sh_c "$config_manager $disable_channel_flag docker-ce-*" $sh_c "$config_manager $enable_channel_flag docker-ce-$CHANNEL" fi $sh_c "$pkg_manager makecache"