Skip to content

Commit

Permalink
install_rpm_containerd: add support for dnf5
Browse files Browse the repository at this point in the history
Fedora 41 and up use the new dnf5 as default, which is a rewrite of
the dnf commands with different options;

    + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
    Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
    make: *** [Makefile:95: verify] Error 2
    script returned exit code 2

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Sep 4, 2024
1 parent 33710d4 commit 53f9996
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion install-containerd-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ function install_rpm_containerd() {
# so this logic works for both cases.
# (See also same logic in install_debian_containerd)

if command -v dnf; then
if command -v dnf5; then
dnf --version

dnf config-manager addrepo --save-filename=docker-ce.repo --from-repofile="${REPO_URL}"
dnf config-manager setopt 'docker-ce-*.enabled=0'
dnf config-manager setopt 'docker-ce-test.enabled=1'
dnf makecache
elif command -v dnf; then
dnf --version

dnf config-manager --add-repo "${REPO_URL}"
Expand Down

0 comments on commit 53f9996

Please sign in to comment.