-
Notifications
You must be signed in to change notification settings - Fork 856
Use deb822-style APT repository configuration #560
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -556,9 +556,27 @@ do_install() { | |
| # Run setup for each distro accordingly | ||
| case "$lsb_dist" in | ||
| ubuntu|debian|raspbian) | ||
| use_deb822=true | ||
| case "$lsb_dist.$dist_version" in | ||
| debian.jessie|ubuntu.trusty) | ||
| use_deb822=false | ||
| ;; | ||
| esac | ||
| pre_reqs="ca-certificates curl" | ||
| apt_repo="deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] $DOWNLOAD_URL/linux/$lsb_dist $dist_version $CHANNEL" | ||
| ( | ||
| if [ "$use_deb822" = true ]; then | ||
| if [ -f /etc/apt/sources.list.d/docker.list ]; then | ||
| echo | ||
| echo "# WARNING: An existing Docker APT repository file using the sources.list format was found at /etc/apt/sources.list.d/docker.list." | ||
| echo "# Please remove this file to avoid conflicting repository settings." | ||
| echo | ||
| fi | ||
|
Comment on lines
+568
to
+573
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have a warning if the script detects that docker is installed already (as its main purpose is for fresh installs, not upgrades); honestly, I think we can keep it simple; assume the if [ -f /etc/apt/sources.list.d/docker.list ]; then
rm -f /etc/apt/sources.list.d/docker.list
fi
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| apt_repo="Types: deb\nURIs: $DOWNLOAD_URL/linux/$lsb_dist\nSuites: $dist_version\nComponents: $CHANNEL\nArchitectures: $(dpkg --print-architecture)\nSigned-By: /etc/apt/keyrings/docker.asc" | ||
| apt_repo_file="/etc/apt/sources.list.d/docker.sources" | ||
| else | ||
| apt_repo="deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] $DOWNLOAD_URL/linux/$lsb_dist $dist_version $CHANNEL" | ||
| apt_repo_file="/etc/apt/sources.list.d/docker.list" | ||
| fi | ||
| if ! is_dry_run; then | ||
| set -x | ||
| fi | ||
|
|
@@ -567,7 +585,7 @@ do_install() { | |
| $sh_c 'install -m 0755 -d /etc/apt/keyrings' | ||
| $sh_c "curl -fsSL \"$DOWNLOAD_URL/linux/$lsb_dist/gpg\" -o /etc/apt/keyrings/docker.asc" | ||
| $sh_c "chmod a+r /etc/apt/keyrings/docker.asc" | ||
| $sh_c "echo \"$apt_repo\" > /etc/apt/sources.list.d/docker.list" | ||
| $sh_c "echo \"$apt_repo\" > $apt_repo_file" | ||
| $sh_c 'apt-get -qq update >/dev/null' | ||
| ) | ||
|
|
||
|
|
||
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.
I think we already make these old distros a hard failure, so we can probably skip this check; older distros are no longer supported by the script, so it's fine if things would fail.
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.
I don't see any hard failure here. Is that in some other component?
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.
Oh, you're right; it's not a hard failure (we may have in the past), but it sleeps for 10 seconds and a warning;
docker-install/install.sh
Line 273 in 2687d91
Regardless, we should prefer keeping the script focused on what's still supported, and try to avoid complexity for things no longer supported; users can still download older versions of the script, or (better) create their own implementation targeted at their situation.
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.
So should I change it to a hard fail for those distro versions?