Merge pull request #4169 from easilok/fix-invalid-docker-version-check

Fix invalid docker version check
This commit is contained in:
🏔️ Peak
2024-11-12 13:21:17 +01:00
committed by GitHub
5 changed files with 24 additions and 10 deletions

View File

@@ -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()) {

View File

@@ -159,7 +159,8 @@ class ValidateAndInstall extends Component
$this->dispatch('refreshBoardingIndex');
$this->dispatch('success', 'Server validated.');
} else {
$this->error = 'Docker Engine version is not 22+. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$requiredDockerVersion = str(config('constants.docker_install_version'))->before('.');
$this->error = 'Minimum Docker Engine version '.$requiredDockerVersion.' is not instaled. Please install Docker manually before continuing: <a target="_blank" class="underline" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$this->server->update([
'validation_logs' => $this->error,
]);