mirror of
https://github.com/docker/docker-install.git
synced 2026-11-20 10:03:11 +03:00
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 <eli.uriegas@docker.com>
This commit is contained in:
1 parent
36b78b2c80
commit
d48913ccbd
1 file changed
+3
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user