Skip to content

Conversation

@nisrael
Copy link
Contributor

@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
@netlify
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit f02e0e1
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/679ca416a5b369000832b0a3
😎 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
Contributor

@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
Contributor 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. 👍

Copy link
Contributor

@vvoland vvoland left a 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

@nisrael
Copy link
Contributor Author

nisrael commented Jan 31, 2025

fixed the linter errors

@dvdksn dvdksn merged commit 255c59b into docker:main Jan 31, 2025
5 checks passed
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