Merge pull request #4169 from easilok/fix-invalid-docker-version-check
Fix invalid docker version check
This commit is contained in:
@@ -66,11 +66,15 @@ class Index extends Component
|
|||||||
|
|
||||||
public bool $serverReachable = true;
|
public bool $serverReachable = true;
|
||||||
|
|
||||||
|
public ?string $minDockerVersion = null;
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
if (auth()->user()?->isMember() && auth()->user()->currentTeam()->show_boarding === true) {
|
if (auth()->user()?->isMember() && auth()->user()->currentTeam()->show_boarding === true) {
|
||||||
return redirect()->route('dashboard');
|
return redirect()->route('dashboard');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->minDockerVersion = str(config('constants.docker_install_version'))->before('.');
|
||||||
$this->privateKeyName = generate_random_name();
|
$this->privateKeyName = generate_random_name();
|
||||||
$this->remoteServerName = generate_random_name();
|
$this->remoteServerName = generate_random_name();
|
||||||
if (isDev()) {
|
if (isDev()) {
|
||||||
|
@@ -159,7 +159,8 @@ class ValidateAndInstall extends Component
|
|||||||
$this->dispatch('refreshBoardingIndex');
|
$this->dispatch('refreshBoardingIndex');
|
||||||
$this->dispatch('success', 'Server validated.');
|
$this->dispatch('success', 'Server validated.');
|
||||||
} else {
|
} 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([
|
$this->server->update([
|
||||||
'validation_logs' => $this->error,
|
'validation_logs' => $this->error,
|
||||||
]);
|
]);
|
||||||
|
@@ -109,7 +109,8 @@ function format_docker_envs_to_json($rawOutput)
|
|||||||
function checkMinimumDockerEngineVersion($dockerVersion)
|
function checkMinimumDockerEngineVersion($dockerVersion)
|
||||||
{
|
{
|
||||||
$majorDockerVersion = str($dockerVersion)->before('.')->value();
|
$majorDockerVersion = str($dockerVersion)->before('.')->value();
|
||||||
if ($majorDockerVersion <= 22) {
|
$requiredDockerVersion = str(config('constants.docker_install_version'))->before('.')->value();
|
||||||
|
if ($majorDockerVersion < $requiredDockerVersion) {
|
||||||
$dockerVersion = null;
|
$dockerVersion = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -323,7 +323,7 @@
|
|||||||
</x-slot:actions>
|
</x-slot:actions>
|
||||||
<x-slot:explanation>
|
<x-slot:explanation>
|
||||||
<p>This will install the latest Docker Engine on your server, configure a few things to be able
|
<p>This will install the latest Docker Engine on your server, configure a few things to be able
|
||||||
to run optimal.<br><br>Minimum Docker Engine version is: 22<br><br>To manually install
|
to run optimal.<br><br>Minimum Docker Engine version is: {{ $minDockerVersion }}<br><br>To manually install
|
||||||
Docker
|
Docker
|
||||||
Engine, check <a target="_blank" class="underline dark:text-warning"
|
Engine, check <a target="_blank" class="underline dark:text-warning"
|
||||||
href="https://docs.docker.com/engine/install/#server">this
|
href="https://docs.docker.com/engine/install/#server">this
|
||||||
|
@@ -86,6 +86,7 @@
|
|||||||
</g>
|
</g>
|
||||||
</svg></div>
|
</svg></div>
|
||||||
@isset($docker_version)
|
@isset($docker_version)
|
||||||
|
@if($docker_version)
|
||||||
<div class="flex w-64 gap-2">Minimum Docker version: <svg class="w-5 h-5 text-success"
|
<div class="flex w-64 gap-2">Minimum Docker version: <svg class="w-5 h-5 text-success"
|
||||||
viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
|
viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="currentColor">
|
<g fill="currentColor">
|
||||||
@@ -96,6 +97,13 @@
|
|||||||
d="m243.28 68.24l-24-23.56a16 16 0 0 0-22.58 0L104 136l-.11-.11l-36.64-35.27a16 16 0 0 0-22.57.06l-24 24a16 16 0 0 0 0 22.61l71.62 72a16 16 0 0 0 22.63 0l128.4-128.38a16 16 0 0 0-.05-22.67M103.62 208L32 136l24-24l.11.11l36.64 35.27a16 16 0 0 0 22.52 0L208.06 56L232 79.6Z" />
|
d="m243.28 68.24l-24-23.56a16 16 0 0 0-22.58 0L104 136l-.11-.11l-36.64-35.27a16 16 0 0 0-22.57.06l-24 24a16 16 0 0 0 0 22.61l71.62 72a16 16 0 0 0 22.63 0l128.4-128.38a16 16 0 0 0-.05-22.67M103.62 208L32 136l24-24l.11.11l36.64 35.27a16 16 0 0 0 22.52 0L208.06 56L232 79.6Z" />
|
||||||
</g>
|
</g>
|
||||||
</svg></div>
|
</svg></div>
|
||||||
|
@else
|
||||||
|
<div class="flex w-64 gap-2">Minimum Docker version: <svg class="w-5 h-5 text-error"
|
||||||
|
viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="currentColor"
|
||||||
|
d="M208.49 191.51a12 12 0 0 1-17 17L128 145l-63.51 63.49a12 12 0 0 1-17-17L111 128L47.51 64.49a12 12 0 0 1 17-17L128 111l63.51-63.52a12 12 0 0 1 17 17L145 128Z" />
|
||||||
|
</svg></div>
|
||||||
|
@endif
|
||||||
@else
|
@else
|
||||||
<div class="w-64"><x-loading text="Minimum Docker version:" /></div>
|
<div class="w-64"><x-loading text="Minimum Docker version:" /></div>
|
||||||
@endisset
|
@endisset
|
||||||
|
Reference in New Issue
Block a user