maxstevens2 Posted August 13, 2020 Share Posted August 13, 2020 (edited) On my unraid server, that i have for around 1,5 years right now, i am getting messages that my docker image is getting above 75%. I thought this issue was because I had too many docker installs, but I found out it actually ain't. The docker file as of now has a file size of arond 16 Gigabytes and the total worth of docker images (docker images command in unraid terminal) ends up in a total of around 9.4 Gigabytes worth of installed Dockers. While i can just easily increase the size of the docker, i prefer to find out where the other ~6 Gigabytes is located at or used for. I tried to use 'docker builder prune' which didnt remove anything, then i tried 'docker container prune' which just removed 1 inactive container. Here's a list of my currently installed docker images: ~ 9586 MB And here a sceenshot of the total file size: Is there any way to see, or to clean up the access storage used by docker.img? Edited August 13, 2020 by maxstevens2 Quote Link to comment
Energen Posted August 13, 2020 Share Posted August 13, 2020 You missed old docker images.. check that too.. The docker image prune command allows you to clean up unused images. By default, docker image prune only cleans up dangling images. A dangling image is one that is not tagged and is not referenced by any container. And by some chance, you could have a lot of logs piling up too... you can check for log sizes like this du -ah /var/lib/docker/containers/ | grep -v "/$" | sort -rh | head -60 | grep .log There's a user script to easily delete docker logs should you need it. 1 Quote Link to comment
maxstevens2 Posted August 14, 2020 Author Share Posted August 14, 2020 19 hours ago, Energen said: du -ah /var/lib/docker/containers/ | grep -v "/$" | sort -rh | head -60 | grep .log Ran the command, doesn't seem like its a big deal. About the docker image history, how do use it? Like what command should i run for it? 'docker image history [OPTIONS] IMAGE' Just is for the installed dockers history and doesn't seem that insane on my docker images. Quote Link to comment
Energen Posted August 14, 2020 Share Posted August 14, 2020 'docker image prune' 1 Quote Link to comment
maxstevens2 Posted August 14, 2020 Author Share Posted August 14, 2020 (edited) Allrighty; i did 'docker image prune -a' and it said a bunch of things and then this: Quote Total reclaimed space: 2.266GB But still the docker.img is 16Gigabytes. Any clue on what to do next? Edited August 14, 2020 by maxstevens2 Quote Link to comment
maxstevens2 Posted August 14, 2020 Author Share Posted August 14, 2020 correction, Unraid now says 62% of docker space used. still a bit high, but at least not in warning state! Thanks for the help @Energen Quote Link to comment
maxstevens2 Posted October 31, 2020 Author Share Posted October 31, 2020 I want to come back onto this toppic, i am now having the same issue again. This time my docker size is 80%, all my dockers together are 8,7GB, the log sizes in total like 200MB and I tried the 'docker image prune -a', but that said 0B. Any other clues where the like ~9GB of space is going towards? Quote Link to comment
maxstevens2 Posted November 7, 2020 Author Share Posted November 7, 2020 At this moment the usage is already 89%, and I still cannot figure out where it is comming from: the logs seem fine, the total dockers together are like ~9GB. 9GB Where is the other 9GB comming from, and how to clear it? Quote Link to comment
maxstevens2 Posted February 19, 2021 Author Share Posted February 19, 2021 Just a comeback back onto this topic. I finnaly increased the size to 30GB. I've also found theses thing out: - portainer is a nice management tool for docker; volumes etc. - found out while using (see below) that I had a volume that used over 2.3 GB! (removed that via Portainer). du -sh /var/lib/docker/volumes/* As of this moment, docker is stable in usage, and I've used 15GB out of 30, so I now hopefully no weird increases (Running Unraid Version: 6.8.3 ) Quote Link to comment
dhstsw Posted February 27, 2021 Share Posted February 27, 2021 Hi all, i'm having a similar issue on 6.9.0-rc2. Briefly, Fix Common Problems keeps reporting i'm running out of space on the docker.img: Quote Docker image file is getting full (currently 88 % used) If i run the "CONTAINER SIZE" script from the Docker page i get this: Quote Total size 15.1 GB 772 MB 304 MB Docker.img was 20Gb, so i incremented its size to 30Gb. BUT, still, FIx Common Problems keeps reporting the same (88% of usage). I already deleted dangling images, without any results. Any idea? thanks. Quote Link to comment
Squid Posted February 27, 2021 Share Posted February 27, 2021 Post your diagnostics Quote Link to comment
maxstevens2 Posted February 27, 2021 Author Share Posted February 27, 2021 (edited) 1 hour ago, dhstsw said: I already deleted dangling images, without any results. Can you do a 'casual' df -h (using terminal or ssh)? look in the list 'Mounted on' for /var/lib/docker Edited February 27, 2021 by maxstevens2 Quote Link to comment
dhstsw Posted February 27, 2021 Share Posted February 27, 2021 Here it is: /dev/loop2 30G 24G 3.4G 88% /var/lib/docker What should i do? Thanks. Quote Link to comment
maxstevens2 Posted February 27, 2021 Author Share Posted February 27, 2021 Alright here a few little steps: - First of all, how many dockers you got? (it can be also achieved with the following command): docker images --format "{{.ID}}\t{{.Size}}\t{{.Repository}}" | sort -k 2 -h - See how much volumes there are that have insane sizes: du -sh /var/lib/docker/volumes/ If this doesn't show something suspicious, try to check things in Portainer Let me know results, will try to help Quote Link to comment
dhstsw Posted February 27, 2021 Share Posted February 27, 2021 Hi, What i see with: docker images --format "{{.ID}}\t{{.Size}}\t{{.Repository}}" | sort -k 2 -h is that many containers seems to be "duplicated"? EG: 9424a2614fcc 108MB haugene/transmission-openvpn c6cd37583653 114MB haugene/transmission-openvpn a682fba409df 120MB haugene/transmission-openvpn f5d02a66d972 121MB haugene/transmission-openvpn b4746e5938dc 2.26GB onlyoffice/documentserver c58d07454e56 2.35GB onlyoffice/documentserver 289798f72e62 2.45GB onlyoffice/documentserver And so on. Any chances to fix that wihtout portainer? Thanks. Quote Link to comment
maxstevens2 Posted February 27, 2021 Author Share Posted February 27, 2021 Try that yes, see what it shows there. expected behavour is this: Do note i am running unraid 6.8.3 Quote Link to comment
dhstsw Posted February 27, 2021 Share Posted February 27, 2021 Used portainer, deleted unused images and volumes and now it looks it is the way it should. Thanks a lot C. Quote Link to comment
maxstevens2 Posted February 28, 2021 Author Share Posted February 28, 2021 Glad to hear it works now. How do you usually install or update dockers? The casual way is just this button: Quote Link to comment
Boyturtle Posted October 14, 2021 Share Posted October 14, 2021 On 8/14/2020 at 12:15 AM, Energen said: And by some chance, you could have a lot of logs piling up too... you can check for log sizes like this du -ah /var/lib/docker/containers/ | grep -v "/$" | sort -rh | head -60 | grep .log There's a user script to easily delete docker logs should you need it. Can you point me to the script please? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.