Docker prune now working to reclame space?

  • Hi Everyone,


    I have noticed that my Overlay2 directory is slowing filling up consuming disc space


    After issuing the command: ' docker system df ' - I see 430MB under 'Reclaimable' which l am assuming this means disc space that l can get back?


    I then issued the following command - ' docker image prune --all ' and re issued the above ' docker system df ' command and it is still reporting 430MB under 'Reclaimable' :(


    I then issue the following commands, which also made no difference and still displaying 430MB under 'Reclaimable'


    docker system prune -a
    docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi
    docker images -q | xargs docker rmi -f


    I wanted ask is anyone knows if this a known issue with Docker within OMV?


    Lastly, could l please ask for some help reduce the disc space and the old folders in the Overlay2 docker directory. I have also tried deleting files from /tmp sub-directories within the Overlay2 directory but there wasn't much too delete that would make a difference disc space wise


    I have seen similar posts whereby people of are simply deleting the images and containers and recreating them however l don't want to be doing this every few months or so. There much be a better solution


    Thanks in advance

  • Hi geaves,


    I have tried using that command ( docker images -q --filter "dangling=true" | xargs -n1 -r docker rmi ) however it did not work and which l am still getting the same results posted in the above screenshot after running the docker system df command :(


    Thanks again but still no joy

    • Offizieller Beitrag

    however it did not work

    Hm! thought that would help, I found this with a different option regrading the reclaimable space. For me I tried docker system prune -a nothing happened, but docker volume prune -a worked.

  • The command that you had mentioned docker volume prune -a returned the following command error " unknown shorthand flag: 'a' in -a "


    I also tried the following command " docker system prune -a --volumes " plus many variants of the prune commands with no luck


    Do l need to be in the ' Overlay2 ' directory when l run these commands?


    Thanks Geaves, l hoping someone might be able chime in with some other alternatives

    • Offizieller Beitrag

    Do l need to be in the ' Overlay2 ' directory when l run these commands?

    No need to be in that directory, all you should need to do is docker image prune -a according to that link -> The -a tells Docker to remove all unused images, without it Docker only removes dangling (untagged) images.

  • Hi Geaves,


    I appreciate that however that command has not work in my OMV docker setup and still showing the amount reclaimable


    Should I have to do a reboot? I wouldn't thought that it would be necessary.


    I also attempted to install Watchtower hoping that might fix my problem but l could get it to work after many attempts (have followed Technolife's video and other guides)

    • Offizieller Beitrag

    I appreciate that however that command has not work in my OMV docker setup and still showing the amount reclaimable

    Then there could be an issue with your docker install, when you execute docker image prune -a a message will appear asking if you want to proceed yes/no if you are not seeing that then I would suggest there could be a problem with your docker install, (even though it works)


    I also attempted to install Watchtower hoping that might fix my problem but l could get it to work after many attempts (have followed Technolife's video and other guides)

    Watchtower is one of the simplest dockers to configure, when you say you could not get it to work what exactly? Watchtower is not instant it needs to be running for it too work, you can check Watchtower's log to see output. Also if you start Watchtower then modify it, it will fail and you have to start over.

  • When l run try run watchtower l get the following error message when after the configuration and saving of the container. I suspect it is not liking the following command that is entered: ' -v /var/run/docker.sock:/var/run/docker.sock \ ' into extra arguments field as instructed in the Technolife video


    I have also tried both v2tec and armhf builds of watchtower on box ( Rock64 ) with same result

    • Offizieller Beitrag

    into extra arguments field as instructed in the Technolife video

    The extra arguments is -v /var/run/docker.sock:/var/run/docker.sock without the \ it clearly states that in the video! In the command box you can enter --cleanup this will download updated containers and delete the old ones.
    Not sure about the Rock64 but my guess would be armhf-latest as the tag

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!