Show cli versions instead of daemon versions

Since the server daemon might not be running

This affects docker and containerd runtimes
pull/12085/head
Anders F Björklund 2021-08-01 09:53:47 +02:00
parent c4cd0dce2f
commit 46c3797169
1 changed files with 6 additions and 5 deletions

View File

@ -53,13 +53,14 @@ var versionCmd = &cobra.Command{
co := mustload.Running(ClusterFlagValue())
runner := co.CP.Runner
versionCMDS := map[string]*exec.Cmd{
"docker": exec.Command("docker", "version", "--format={{.Client.Version}}"),
"docker": exec.Command("docker", "--version"),
"dockerd": exec.Command("dockerd", "--version"),
"containerd": exec.Command("containerd", "--version"),
"crio": exec.Command("crio", "version"),
"podman": exec.Command("sudo", "podman", "version"),
"crictl": exec.Command("sudo", "crictl", "version"),
"crio": exec.Command("crio", "--version"),
"podman": exec.Command("sudo", "podman", "--version"),
"crictl": exec.Command("sudo", "crictl", "--version"),
"buildctl": exec.Command("buildctl", "--version"),
"ctr": exec.Command("sudo", "ctr", "version"),
"ctr": exec.Command("ctr", "--version"),
"runc": exec.Command("runc", "--version"),
}
for k, v := range versionCMDS {