Details
-
Bug
-
Resolution: Obsolete
-
Minor
-
None
-
5.8.1.Final
-
None
-
Workaround Exists
-
Description
Problem
The Docker controller that allocates databases as Docker containers cleans up containers and does not leave unnecessary images:
[root@karm-centos7-x86-64 ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/postgres 9.4 26bd9b04b948 6 days ago 232 MB docker.io/postgres 10 0965cdc98045 6 days ago 234 MB docker.io/postgres <none> ed5db6e669ff 7 weeks ago 263 MB docker.io/postgres <none> 30121e967865 7 weeks ago 289 MB [root@karm-centos7-x86-64 ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [root@karm-centos7-x86-64 ~]#
Although it leaves stray container volumes for some reason:
[root@karm-centos7-x86-64 ~]# du -hs /var/lib/docker-latest/volumes 15G /var/lib/docker-latest/volumes [root@karm-centos7-x86-64 ~]# docker volume ls -qf dangling=true | wc -l 409
It unnecessarily clogs the slaves' disk space. The 15G of garbage has been created over dozens and dozens of builds with at least two containers each, but it shouldn't be happening anyway.
Call to action
Review whether removeContainerCmd is supposed to be enough to not only remove the container but to also remove its volume.
Workaround
docker volume prune