Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

:sparkles: Install prerequisites and Docker on Alpine

Benoît de Biolley47a14765e14c
diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php
index 2256f186e0..f4c5bdf6a5 100644
--- a/app/Actions/Server/InstallDocker.php
+++ b/app/Actions/Server/InstallDocker.php
@@ -158,9 +158,11 @@ class InstallDocker
private function getAlpineDockerInstallCommand(): string
{
- return "echo 'Installing Prerequisites...' && ".
- 'apk update && '.
- 'apk add docker';
+ return 'apk update && '.
+ 'apk add docker docker-cli-compose && '.
+ 'mkdir -p /etc/docker && '.
+ 'rc-update add docker default && '.
+ 'service docker start';
}
private function getGenericDockerInstallCommand(): string
diff --git a/app/Actions/Server/InstallPrerequisites.php b/app/Actions/Server/InstallPrerequisites.php
index 84be7f2068..ffb8f1208e 100644
--- a/app/Actions/Server/InstallPrerequisites.php
+++ b/app/Actions/Server/InstallPrerequisites.php
@@ -53,6 +53,17 @@ class InstallPrerequisites
"echo 'Installing Prerequisites for Arch Linux...'",
'pacman -Syu --noconfirm --needed curl wget git jq',
]);
+ } elseif ($supported_os_type->contains('alpine')) {
+ // The community repository holds docker and is commented out on some Alpine images
+ $command = $command->merge([
+ "echo 'Installing Prerequisites for Alpine Linux...'",
+ "sed -i '/^#.*\\/community/s/^#//' /etc/apk/repositories 2>/dev/null || true",
+ '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',
+ ]);
} else {
throw new \Exception('Unsupported OS type for prerequisites installation');
}