-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly install both containerd and Docker CLI to handle upgrades #195
Conversation
Signed-off-by: Tibor Vass <[email protected]>
@@ -460,7 +456,7 @@ do_install() { | |||
fi | |||
search_command="$pkg_manager list --showduplicates 'docker-ce-cli' | grep '$pkg_pattern' | tail -1 | awk '{print \$2}'" | |||
# It's okay for cli_pkg_version to be blank, since older versions don't support a cli package | |||
cli_pkg_version="$($sh_c "$search_command" | cut -d':' -f 2)" | |||
cli_pkg_version="-$($sh_c "$search_command" | cut -d':' -f 2)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this probably breaks installing older versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, but not at my computer to test.
@tianon ptal if you have time <3 |
After this, we may be able to address #183 as well |
I'm not really in-tune with how folks are using this script, but I know installing old versions used to be really common. I agree that updating |
Why is this necessary? If users wanted to upgrade their containerd.io version then they'd run a package upgrade Also if a new install of docker-ce requires a newer version of containerd then it should upgrade through the package manager. Not entirely sure I see the benefit here. |
We discussed that recently, and @cpuguy83 tried that, but unfortunately Not sure if there's alternatives to that approach. On the other hand, we discussed if we should forcibly block users from installing newer containerd versions when installing older versions of docker; given that "technically", newer versions should be compatible, we thought it was best to leave "holding back" newer versions as an exercise the the user.
and
Yes, that should be the normal way to upgrade docker, containerd (or any package). However, in practice I frequently encounter users using it to upgrade docker as well (or even use it in their dotfiles? 🤷♂️ #183 (comment)) The problem with that situation is that (even though a warning is printed and the script is halted for 20 seconds), it "seems" to work (docker is updated), however, users end up with a partial update only (e.g. "engine" updated, but cli not, or containerd not being updated).
Perhaps we need the approach that Rancher took, and have a script for each version ? Not a huge fan from a maintenance perspective thought https://github.com/rancher/install-docker |
I mean, I'm still a fan of deprecating the script entirely, which makes the maintenance burden go away completely. ❤️ (Really, pushes the burden back onto the docs, which is something needed anyhow.) |
Agree for containerd, but not for docker cli, the CLI is more docker than engine these days. I'll update to not install containerd.io explicitly. |
Signed-off-by: Tibor Vass [email protected]