From 240331556e061d3823459da46cddd576a6732a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20de=20Biolley?= Date: Mon, 22 Dec 2025 11:52:12 +0100 Subject: [PATCH] :sparkles: Install docker on alpine --- app/Actions/Server/InstallDocker.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php index 21dc2f80b..5115d506a 100644 --- a/app/Actions/Server/InstallDocker.php +++ b/app/Actions/Server/InstallDocker.php @@ -81,14 +81,7 @@ class InstallDocker } elseif ($supported_os_type->contains('arch')) { $command = $command->merge([$this->getArchDockerInstallCommand()]); } elseif ($supported_os_type->contains('alpine')) { - $command = $command->merge([ - "echo 'Installing Prerequisites...'", - 'apk update', - 'command -v curl >/dev/null || apk add curl', - 'command -v wget >/dev/null || apk add wget', - 'command -v git >/dev/null || apk add git', - 'command -v jq >/dev/null || apk add jq', - ]); + $command = $command->merge([$this->getAlpineDockerInstallCommand()]); } else { $command = $command->merge([$this->getGenericDockerInstallCommand()]); } @@ -168,6 +161,13 @@ class InstallDocker 'systemctl start docker.service'; } + private function getAlpineDockerInstallCommand(): string + { + return "echo 'Installing Prerequisites...' && ". + 'apk update && '. + 'apk add docker'; + } + private function getGenericDockerInstallCommand(): string { return "curl --max-time 300 --retry 3 https://releases.rancher.com/install-docker/{$this->dockerVersion}.sh | sh || curl --max-time 300 --retry 3 https://get.docker.com | sh -s -- --version {$this->dockerVersion}";