docker info: are huge (tens-of-thousands) container counts normal? -


question: normal, many containers , images? containers: 12298 images: 53

this docker info output. i've removed 'unused' images docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")

and have better output:

repository          tag                 image id            created             virtual size ms3_web            latest              29be36b03920        7 hours ago         824.5 mb ms3_nginx          latest              1ca3183075d8        14 hours ago        206.5 mb <none>              <none>              2f77583dfd8c        3 weeks ago         686 mb python              3.4                 285252a442bf        4 weeks ago         686 mb postgres            latest              0ded1aedd6ed        4 weeks ago         265.9 mb tutum/nginx         latest              30a6f176d2a9        5 months ago        206.5 mb  containers: 12298 images: 53 server version: 1.9.1 storage driver: aufs  root dir: /var/lib/docker/aufs  backing filesystem: extfs  dirs: 24657  dirperm1 supported: false execution driver: native-0.2 logging driver: json-file kernel version: 3.13.0-68-generic operating system: ubuntu 14.04.3 lts cpus: 1 total memory: 994 mib 

i use docker-compose running containers.

should cear containers , images?

every time type docker-compose up initiating number of containers task. twelve thousand sounds lot, docker new way run process. it's not traditional virtual machine. lot of people balk @ "sizes" of images they're seeing, because of how docker works, it's not using space each of images. it's storing filesystem layers, smaller images based off. personally, keep containers , images trimmed, that's matter of preference. not harming system keeping around of exited containers. else, can list of containers (including containers have exited , no longer running) typing docker ps -a , checking out list. there examples online showing ways trim exited containers, such as:

docker ps -aq --no-trunc -f status=exited | xargs docker rm 

you can view exited containers similar command:

docker ps -a -f status=exited 

something keep in mind container has status "dead" , above command not remove them, because our filter selects containers "exited" status. if want remove all stopped containers, can use this:

docker ps -aq --no-trunc | xargs docker rm 

just remember docker way run process , not full-blown vm other software. it's entirely system, isn't bad sounds. sound know you're doing, , shouldn't have trouble keeping containers , images nice , trimmed. luck!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -