diff --git a/app/Models/Server.php b/app/Models/Server.php index ad1700819..38c427dc4 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -897,7 +897,9 @@ public function validateDockerSwarm() } public function validateDockerEngineVersion() { - $dockerVersion = instant_remote_process(["docker version|head -2|grep -i version| awk '{print $2}'"], $this, false); + $dockerVersionRaw = instant_remote_process(["docker version --format json"], $this, false); + $dockerVersionJson = json_decode($dockerVersionRaw, true); + $dockerVersion = data_get($dockerVersionJson, 'Server.Version', '0.0.0'); $dockerVersion = checkMinimumDockerEngineVersion($dockerVersion); if (is_null($dockerVersion)) { $this->settings->is_usable = false;