Merge pull request #4289 from NexiaMoe/fix-fedora-dnf5

Fix: Coolify docker installer fail on Fedora 41 with DNF5
This commit is contained in:
🏔️ Peak
2024-11-14 21:29:41 +01:00
committed by GitHub

View File

@@ -326,6 +326,22 @@ if ! [ -x "$(command -v docker)" ]; then
exit 1 exit 1
fi fi
;; ;;
"fedora")
if [ -x "$(command -v dnf5)" ]; then
# dnf5 is available
dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/fedora/docker-ce.repo --overwrite >/dev/null 2>&1
else
# dnf5 is not available, use dnf
dnf config-manager --add-repo=https://download.docker.com/linux/fedora/docker-ce.repo >/dev/null 2>&1
fi
dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin >/dev/null 2>&1
if ! [ -x "$(command -v docker)" ]; then
echo " - Docker could not be installed automatically. Please visit https://docs.docker.com/engine/install/ and install Docker manually to continue."
exit 1
fi
systemctl start docker >/dev/null 2>&1
systemctl enable docker >/dev/null 2>&1
;;
*) *)
if [ "$OS_TYPE" = "ubuntu" ] && [ "$OS_VERSION" = "24.10" ]; then if [ "$OS_TYPE" = "ubuntu" ] && [ "$OS_VERSION" = "24.10" ]; then
echo "Docker automated installation is not supported on Ubuntu 24.10 (non-LTS release)." echo "Docker automated installation is not supported on Ubuntu 24.10 (non-LTS release)."