mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Merge 552c8e4c74 into 6b2a669cb9
This commit is contained in:
commit
830d69190f
2 changed files with 14 additions and 1 deletions
|
|
@ -78,6 +78,8 @@ class InstallDocker
|
||||||
$command = $command->merge([$this->getDebianDockerInstallCommand()]);
|
$command = $command->merge([$this->getDebianDockerInstallCommand()]);
|
||||||
} elseif ($supported_os_type->contains('rhel')) {
|
} elseif ($supported_os_type->contains('rhel')) {
|
||||||
$command = $command->merge([$this->getRhelDockerInstallCommand()]);
|
$command = $command->merge([$this->getRhelDockerInstallCommand()]);
|
||||||
|
} elseif ($supported_os_type->contains('fedora')) {
|
||||||
|
$command = $command->merge([$this->getFedoraDockerInstallCommand()]);
|
||||||
} elseif ($supported_os_type->contains('sles')) {
|
} elseif ($supported_os_type->contains('sles')) {
|
||||||
$command = $command->merge([$this->getSuseDockerInstallCommand()]);
|
$command = $command->merge([$this->getSuseDockerInstallCommand()]);
|
||||||
} elseif ($supported_os_type->contains('arch')) {
|
} elseif ($supported_os_type->contains('arch')) {
|
||||||
|
|
@ -139,6 +141,16 @@ class InstallDocker
|
||||||
')';
|
')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getFedoraDockerInstallCommand(): string
|
||||||
|
{
|
||||||
|
return "curl https://releases.rancher.com/install-docker/{$this->dockerVersion}.sh | sh || curl https://get.docker.com | sh -s -- --version {$this->dockerVersion} || (".
|
||||||
|
'dnf config-manager addrepo --from-repofile https://download.docker.com/linux/fedora/docker-ce.repo && '.
|
||||||
|
'dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin && '.
|
||||||
|
'systemctl start docker && '.
|
||||||
|
'systemctl enable docker --now'.
|
||||||
|
')';
|
||||||
|
}
|
||||||
|
|
||||||
private function getSuseDockerInstallCommand(): string
|
private function getSuseDockerInstallCommand(): string
|
||||||
{
|
{
|
||||||
return "curl https://releases.rancher.com/install-docker/{$this->dockerVersion}.sh | sh || curl https://get.docker.com | sh -s -- --version {$this->dockerVersion} || (".
|
return "curl https://releases.rancher.com/install-docker/{$this->dockerVersion}.sh | sh || curl https://get.docker.com | sh -s -- --version {$this->dockerVersion} || (".
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,8 @@ if ! [ -x "$(command -v docker)" ]; then
|
||||||
"centos" | "fedora" | "rhel" | "tencentos")
|
"centos" | "fedora" | "rhel" | "tencentos")
|
||||||
if [ -x "$(command -v dnf5)" ]; then
|
if [ -x "$(command -v dnf5)" ]; then
|
||||||
# dnf5 is available
|
# dnf5 is available
|
||||||
dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/$OS_TYPE/docker-ce.repo --overwrite >/dev/null 2>&1
|
dnf config-manager addrepo --from-repofile https://download.docker.com/linux/$OS_TYPE/docker-ce.repo
|
||||||
|
--overwrite >/dev/null 2>&1
|
||||||
else
|
else
|
||||||
# dnf5 is not available, use dnf
|
# dnf5 is not available, use dnf
|
||||||
dnf config-manager --add-repo=https://download.docker.com/linux/$OS_TYPE/docker-ce.repo >/dev/null 2>&1
|
dnf config-manager --add-repo=https://download.docker.com/linux/$OS_TYPE/docker-ce.repo >/dev/null 2>&1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue