Clean docker environment: devicemapper

前端 未结 4 1280
野性不改
野性不改 2020-11-30 19:55

I have a docker environment with 2 containers (Jenkins and Nexus, both with their own named volume). I have a daily cron-job which deletes unused containers and images. This

4条回答
  •  独厮守ぢ
    2020-11-30 20:17

    I faced the same issue where in my /var/lib/docker/devicemapper/devicemapper/data file has reached ~91% of root volume(~45G of 50G). I tried removing all the unwanted images, deleted volumes, nothing helped in reducing this file.

    Did a few googling and understood that the "data" files is loopback-mounted sparse files and docker uses it to store the mount locations and other files we would have stored inside the containers.

    Finally I removed all the images which were run before and stopped

    docker rm $(docker ps -aq)

    The reduced the devicemapper file significantly. Hope this may help you .

提交回复
热议问题