Docker Community Forums

Share and learn in the Docker community.

Docker ps -s returns -1 as container size?


(Jhovell) #1

I am running Docker 1.11.1 using the latest AWS ECS AMI (2016.03c - http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) using the default 22GB devicemapper for container/image storage.

Typically the first time I run “docker ps -s” to see the size of running containers, it takes 5-10 seconds to return and I see a list of containers as well as their sizes. However any subsequent call to “docker ps -s” returns immediately and results look like the following:

abcdef123example amazon/amazon-ecs-agent:latest “/agent” 2 weeks ago Up 2 weeks 127.0.0.1:51678->51678/tcp ecs-agent -1 B (virtual 9.317 MB)

As you can see the size is returned as -1 B. Is this a known issue? Any workaround? Is there a better or alternative way to understand how much storage running containers are using with devicemapper?