Search code examples
dockercontainerslinux-containers

Deleting files inside docker container not freeing up space on host system


My docker containers have some data generated from applications running in the container. Even when I delete those files inside container system I can still see them existing on host system at var/lib/docker/devicemapper/mnt/c76a6e7874bbfb7d18c7f8aeaed154460ca5b8a18e1823d813b621bc7c42afa8/rootfs/var/www/html/etc/app/files

This is not freeing up space on host system. Any thoughts on this ?

Appreciate your help.


Solution

  • It seems to me that docker and the device mapper reserved 10 Gb (by default, you can modify this, see http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/) so you can have many files or 0 file in your container, you will use the same size.