summaryrefslogtreecommitdiff
path: root/cmd/podman/stats.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/stats.go')
-rw-r--r--cmd/podman/stats.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/stats.go b/cmd/podman/stats.go
index 45868e8d7..2d6a2a3d2 100644
--- a/cmd/podman/stats.go
+++ b/cmd/podman/stats.go
@@ -2,6 +2,7 @@ package main
import (
"fmt"
+ "os"
"reflect"
"strings"
"time"
@@ -62,6 +63,10 @@ func statsCmd(c *cli.Context) error {
return err
}
+ if os.Getuid() != 0 {
+ return errors.New("stats is not supported for rootless containers")
+ }
+
all := c.Bool("all")
latest := c.Bool("latest")
ctr := 0