From eedc9e586d28d308f25da2994555fa0a6f4a6b58 Mon Sep 17 00:00:00 2001 From: Murat Aslan Date: Sat, 29 Nov 2025 13:29:30 +0300 Subject: [PATCH] fix: add Arch Linux support for Docker installation Arch Linux was listed in SUPPORTED_OS but InstallDocker.php had no specific handler for it, causing 'Unsupported OS' errors when trying to add Arch Linux servers. This adds: - Detection of 'arch' OS type in the install flow - New getArchDockerInstallCommand() method using pacman: - pacman -Syyy (refresh package databases) - pacman -S docker docker-compose (install Docker) - systemctl start/enable docker Fixes #4523 --- app/Actions/Server/InstallDocker.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php index 36c540950..3f69a55e6 100644 --- a/app/Actions/Server/InstallDocker.php +++ b/app/Actions/Server/InstallDocker.php @@ -78,6 +78,8 @@ public function handle(Server $server) $command = $command->merge([$this->getRhelDockerInstallCommand()]); } elseif ($supported_os_type->contains('sles')) { $command = $command->merge([$this->getSuseDockerInstallCommand()]); + } elseif ($supported_os_type->contains('arch')) { + $command = $command->merge([$this->getArchDockerInstallCommand()]); } else { $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 { return "curl https://releases.rancher.com/install-docker/{$this->dockerVersion}.sh | sh || curl https://get.docker.com | sh -s -- --version {$this->dockerVersion}";