Skip to content
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

directly support ubuntu based distros in add repository snippet #21749

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nisrael
Copy link

@nisrael nisrael commented Jan 9, 2025

default to VERSION_CODENAME but use UBUNTU_CODENAME if present and remove comment to do so manually

Description

The note, that was added in the documentation to use UBUNTU_CODENAME instead of VERSION_CODENAME could easily be implemented in the snippet directly, by using shell parameter expansion with a default value. In case UBUNTU_CODENAME is present in /etc/os-release it is used and otherwise the regular VERSION_CODENAME.

default to VERSION_CODENAME but use UBUNTU_CODENAME if present and remove comment to do so manually
@nisrael nisrael requested a review from dvdksn as a code owner January 9, 2025 11:39
@github-actions github-actions bot added area/engine Issue affects Docker engine/daemon area/install Relates to installing a product labels Jan 9, 2025
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit c5c379a
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/678557c9509033000899bded
😎 Deploy Preview https://deploy-preview-21749--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 LGTM cc @thaJeztah

@dvdksn dvdksn requested a review from thaJeztah January 9, 2025 12:10
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure; still on the fence on this. We don't test on any of these derivatives, which is why we added a section about this; https://docs.docker.com/engine/install/#other-linux-distributions

trying to make it "just work" without the user acknowledging / realizing it's an unsupported setup may make it seem as if it's supported / tested.

@vvoland @tianon @neersighted any thoughts?

Comment on lines -130 to -139
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```

> [!NOTE]
>
> If you use an Ubuntu derivative distribution, such as Linux Mint,
> you may need to use `UBUNTU_CODENAME` instead of `VERSION_CODENAME`.

Copy link
Contributor

@vvoland vvoland Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'm okay with making it use UBUNTU_CODENAME if available, as long as we keep the notice but change it to warn about derivatives are not supported officially (but MAY work).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rephrased the notice and moved it to the section, where the supported distributions are listed.

@tianon
Copy link
Contributor

tianon commented Jan 13, 2025

Agreed, should be mostly harmless. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engine Issue affects Docker engine/daemon area/install Relates to installing a product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants