Merge pull request #5834 from rhatdan/version

Add version to podman info command
This commit is contained in:
OpenShift Merge Robot 2020-04-16 03:09:15 -07:00 committed by GitHub
commit 084cfb81da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {