fix: add Arch Linux support for Docker installation (#7408)

This commit is contained in:
Andras Bacsai 2025-12-07 19:08:20 +01:00 committed by GitHub
commit 847c4f4627
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,6 +78,8 @@ public function handle(Server $server)
$command = $command->merge([$this->getRhelDockerInstallCommand()]); $command = $command->merge([$this->getRhelDockerInstallCommand()]);
} 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')) {
$command = $command->merge([$this->getArchDockerInstallCommand()]);
} else { } else {
$command = $command->merge([$this->getGenericDockerInstallCommand()]); $command = $command->merge([$this->getGenericDockerInstallCommand()]);
} }
@ -146,6 +148,14 @@ private function getSuseDockerInstallCommand(): string
')'; ')';
} }
private function getArchDockerInstallCommand(): string
{
return 'pacman -Syyy --noconfirm && '.
'pacman -S docker docker-compose --noconfirm && '.
'systemctl start docker && '.
'systemctl enable docker';
}
private function getGenericDockerInstallCommand(): string private function getGenericDockerInstallCommand(): 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}";