diff --git a/app/Livewire/Boarding/Index.php b/app/Livewire/Boarding/Index.php index c9c3092b32..3d18ee5ebc 100644 --- a/app/Livewire/Boarding/Index.php +++ b/app/Livewire/Boarding/Index.php @@ -66,11 +66,15 @@ class Index extends Component public bool $serverReachable = true; + public ?string $minDockerVersion = null; + public function mount() { if (auth()->user()?->isMember() && auth()->user()->currentTeam()->show_boarding === true) { return redirect()->route('dashboard'); } + + $this->minDockerVersion = str(config('constants.docker_install_version'))->before('.'); $this->privateKeyName = generate_random_name(); $this->remoteServerName = generate_random_name(); if (isDev()) { diff --git a/app/Livewire/Server/ValidateAndInstall.php b/app/Livewire/Server/ValidateAndInstall.php index 8c5bc23ed4..eed368973d 100644 --- a/app/Livewire/Server/ValidateAndInstall.php +++ b/app/Livewire/Server/ValidateAndInstall.php @@ -159,7 +159,8 @@ public function validateDockerVersion() $this->dispatch('refreshBoardingIndex'); $this->dispatch('success', 'Server validated.'); } else { - $this->error = 'Docker Engine version is not 22+. Please install Docker manually before continuing: documentation.'; + $requiredDockerVersion = str(config('constants.docker_install_version'))->before('.'); + $this->error = 'Minimum Docker Engine version '.$requiredDockerVersion.' is not instaled. Please install Docker manually before continuing: documentation.'; $this->server->update([ 'validation_logs' => $this->error, ]); diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php index 2e583b94d9..ec6be72114 100644 --- a/bootstrap/helpers/docker.php +++ b/bootstrap/helpers/docker.php @@ -109,7 +109,8 @@ function format_docker_envs_to_json($rawOutput) function checkMinimumDockerEngineVersion($dockerVersion) { $majorDockerVersion = str($dockerVersion)->before('.')->value(); - if ($majorDockerVersion <= 22) { + $requiredDockerVersion = str(config('constants.docker_install_version'))->before('.')->value(); + if ($majorDockerVersion < $requiredDockerVersion) { $dockerVersion = null; } diff --git a/resources/views/livewire/boarding/index.blade.php b/resources/views/livewire/boarding/index.blade.php index 5c5dc09a05..f0f52aa8b9 100644 --- a/resources/views/livewire/boarding/index.blade.php +++ b/resources/views/livewire/boarding/index.blade.php @@ -323,7 +323,7 @@ class="text-left text-sm text-gray-600 dark:text-gray-300 hover:underline">

This will install the latest Docker Engine on your server, configure a few things to be able - to run optimal.

Minimum Docker Engine version is: 22

To manually install + to run optimal.

Minimum Docker Engine version is: {{ $minDockerVersion }}

To manually install Docker Engine, check this diff --git a/resources/views/livewire/server/validate-and-install.blade.php b/resources/views/livewire/server/validate-and-install.blade.php index fc499f98fc..0acc7972e2 100644 --- a/resources/views/livewire/server/validate-and-install.blade.php +++ b/resources/views/livewire/server/validate-and-install.blade.php @@ -86,16 +86,24 @@ @isset($docker_version) + @if($docker_version)

Minimum Docker version: + + + + +
+ @else +
Minimum Docker version: - - - - +
+ @endif @else
@endisset