-
Notifications
You must be signed in to change notification settings - Fork 8.1k
directly support ubuntu based distros in add repository snippet #21749
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
Conversation
default to VERSION_CODENAME but use UBUNTU_CODENAME if present and remove comment to do so manually
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
dvdksn
left a comment
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.
👀 LGTM cc @thaJeztah
thaJeztah
left a comment
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.
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?
| $(. /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`. | ||
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.
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).
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 rephrased the notice and moved it to the section, where the supported distributions are listed.
|
Agreed, should be mostly harmless. 👍 |
vvoland
left a comment
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.
LGTM after fixing linter errors
|
fixed the linter errors |
default to
VERSION_CODENAMEbut useUBUNTU_CODENAMEif present and remove comment to do so manuallyDescription
The note, that was added in the documentation to use
UBUNTU_CODENAMEinstead ofVERSION_CODENAMEcould easily be implemented in the snippet directly, by using shell parameter expansion with a default value. In caseUBUNTU_CODENAMEis present in/etc/os-releaseit is used and otherwise the regularVERSION_CODENAME.