Add version to podman info command

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2020-04-15 21:29:10 -04:00
parent d6b3bc18f8
commit 62803f8d3b
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ type Info struct {
Host *HostInfo `json:"host"`
Store *StoreInfo `json:"store"`
Registries map[string]interface{} `json:"registries"`
Version Version `json:"version"`
}
//HostInfo describes the libpod host

View File

@ -26,6 +26,11 @@ import (
// Info returns the store and host information
func (r *Runtime) info() (*define.Info, error) {
info := define.Info{}
versionInfo, err := define.GetVersion()
if err != nil {
return nil, errors.Wrapf(err, "error getting version info")
}
info.Version = versionInfo
// get host information
hostInfo, err := r.hostInfo()
if err != nil {