✨ Install docker on alpine
This commit is contained in:
parent
1bfde7d7c6
commit
7ec1c939bf
1 changed files with 8 additions and 8 deletions
|
|
@ -80,14 +80,7 @@ public function handle(Server $server)
|
|||
} 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()]);
|
||||
}
|
||||
|
|
@ -163,6 +156,13 @@ private function getArchDockerInstallCommand(): string
|
|||
'systemctl start docker.service';
|
||||
}
|
||||
|
||||
private function getAlpineDockerInstallCommand(): string
|
||||
{
|
||||
return "echo 'Installing Prerequisites...' && ".
|
||||
'apk update && '.
|
||||
'apk add docker';
|
||||
}
|
||||
|
||||
private function getGenericDockerInstallCommand(): string
|
||||
{
|
||||
return 'curl -fsSL https://get.docker.com | sh';
|
||||
|
|
|
|||
Loading…
Reference in a new issue