From 5b8393bde499d0a6ee6186efe035d929144a8918 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Tue, 9 Feb 2021 22:50:11 +0300 Subject: [PATCH] Add docker moby server version (#2657) --- .../SoftwareReport/SoftwareReport.Generator.ps1 | 3 ++- .../scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index d10d82510..21754fe86 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -96,7 +96,8 @@ $toolsList = @( (Get-CoreUtilsVersion), (Get-CMakeVersion), (Get-CurlVersion), - (Get-DockerMobyVersion), + (Get-DockerMobyClientVersion), + (Get-DockerMobyServerVersion), (Get-DockerComposeVersion), (Get-DockerBuildxVersion), (Get-GitVersion), diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 9226ad055..be10c2fac 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -84,9 +84,14 @@ function Get-DockerComposeVersion { return "Docker Compose $composeVersion" } -function Get-DockerMobyVersion { - $dockerVersion = docker -v | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "+" - return "Docker-Moby $dockerVersion" +function Get-DockerMobyClientVersion { + $dockerClientVersion = sudo docker version --format '{{.Client.Version}}' + return "Docker-Moby Client $dockerClientVersion" +} + +function Get-DockerMobyServerVersion { + $dockerServerVersion = sudo docker version --format '{{.Server.Version}}' + return "Docker-Moby Server $dockerServerVersion" } function Get-DockerBuildxVersion {