Skip to content

Commit

Permalink
Merge pull request docker#553 from tiborvass/use-test-channel
Browse files Browse the repository at this point in the history
[ce-nightly] Always use test channel when installing containerd
  • Loading branch information
tiborvass authored Oct 22, 2020
2 parents 7d6303c + c839f4e commit 855149b
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions install-containerd-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@ function install_rpm_containerd() {
# Install containerd dependency for non-zypper dependecies
echo "[DEBUG] Installing engine dependencies from ${REPO_URL}"

pkg_config_manager="yum-config-manager"
# Note: we enable test channel to be able to test non-stable containerd packages as well.
# Once a containerd package becomes stable it will also be available in the test channel,
# so this logic works for both cases.
# (See also same logic in install_debian_containerd)

if dnf --version; then
pkg_config_manager="dnf config-manager"
dnf config-manager --add-repo "${REPO_URL}"
dnf config-manager --set-disabled docker-ce-*
dnf config-manager --set-enabled docker-ce-test
dnf makecache
else
yum-config-manager --add-repo "${REPO_URL}"
yum-config-manager --disable docker-ce-*
yum-config-manager --enable docker-ce-test
yum makecache
fi

${pkg_config_manager} --add-repo "${REPO_URL}"
}

# Steps taken from: https://docs.docker.com/install/linux/docker-ce/ubuntu/
Expand All @@ -47,7 +57,12 @@ function install_debian_containerd() {
DIST_VERSION='buster'
fi
ARCH=$(dpkg --print-architecture)
echo "deb [arch=${ARCH}] ${REPO_URL} ${DIST_VERSION} stable" >/etc/apt/sources.list.d/docker.list

# Note: we enable test channel to be able to test non-stable containerd packages as well.
# Once a containerd package becomes stable it will also be available in the test channel,
# so this logic works for both cases.
# (See also same logic in install_rpm_containerd)
echo "deb [arch=${ARCH}] ${REPO_URL} ${DIST_VERSION} test" > /etc/apt/sources.list.d/docker.list

apt-get update
}

0 comments on commit 855149b

Please sign in to comment.