mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #1793 from vrothberg/rootless-info
info: add rootless field
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/containers/libpod/pkg/rootless"
|
||||
"github.com/containers/libpod/utils"
|
||||
"github.com/containers/storage/pkg/system"
|
||||
"github.com/pkg/errors"
|
||||
@ -30,6 +31,7 @@ func (r *Runtime) hostInfo() (map[string]interface{}, error) {
|
||||
info["os"] = runtime.GOOS
|
||||
info["arch"] = runtime.GOARCH
|
||||
info["cpus"] = runtime.NumCPU()
|
||||
info["rootless"] = rootless.IsRootless()
|
||||
mi, err := system.ReadMemInfo()
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error reading memory info")
|
||||
|
Reference in New Issue
Block a user