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

[pull] master from docker:master #61

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 10, 2024

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

thaJeztah and others added 2 commits December 5, 2024 14:04
The installation script's main purpose is to perform a fresh install, because
it's not guaranteed to work correctly when updating an existing installation,
and we print a warning if we find docker is already installed. However, it's
known that the script is used to update existing installations.

The current script has some limitations for the update scenario;

- When using the script for installing from the staging domain, the existing
  repo configuration is not overwritten. When using `yum`, or older `dnf` versions
  this resulted in 2 separate repo files to be created (docker-ce.repo and
  docker-ce-staging.repo), which resulted in errors due to duplicate repo
  definitions with the same name.
- When using `dnf5`, we specified the filename to store the configuration,
  which resulted in an error;

        + sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --from-repofile='\''https://download-stage.docker.com/linux/fedora/docker-ce-staging.repo'\'''
          File "/etc/yum.repos.d/docker-ce.repo" already exists and configures repositories with IDs "docker-ce-stable docker-ce-stable-debuginfo docker-ce-stable-source docker-ce-test docker-ce-test-debuginfo docker-ce-test-source docker-ce-nightly docker-ce-nightly-debuginfo docker-ce-nightly-source". Add "--overwrite" to overwrite.

  - On SLES, it would result in a similar error;

        + sh -c 'zypper addrepo https://download-stage.docker.com/linux/sles/docker-ce-staging.repo'
          Adding repository 'Docker CE Nightly - s390x' ......................................................................................[error]
          Repository named 'docker-ce-nightly' already exists. Please use another alias.
          Adding repository 'Docker CE Nightly - Debuginfo s390x' ............................................................................[error]
          Repository named 'docker-ce-nightly-debuginfo' already exists. Please use another alias.

This patch updates the script to overwrite / replace the existing repo config.
This brings the rpm-based installations in line with the Debian approach, which
unconditionally overwrites `/etc/apt/sources.list.d/docker.list`.

It's worth noting that this change will therefore overwrite any customisations
made to the repo-configurations, so a warning is added for that.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
rpm: always replace existing repo-configuration
@pull pull bot added the ⤵️ pull label Dec 10, 2024
@pull pull bot merged commit c84dd77 into zengqingfu1442:master Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants