June 3, 20251 yr Community Expert Hi GuysI keep getting a report saying; Docker image disk utilization of 100%As a spin off I am getting dockers which wont run reliably and in some instances I cant get on the WebUI.So, I read up and thought I would increase the docker size.I read that docker ps -s is the best way to get info;But didnt really know how to interpret this... so, I checked the container size from the docker tab, it shows its 11.5Gb;So, having read its meant to be 20Gb, I thought I would stop the docker and increase it - but it shows as 20Gb already...So where have I lost 9.5Gb?I did wonder if I need to 'scrub' the docker, but dont really know what this will do, so dont want to do something which will cause more issues.Any help appreciated. Edited June 3, 20251 yr by SliMat
June 3, 20251 yr Community Expert Most likely in docker images, pull and build taking up space for updates and not having enouth space to complete a existing docker and pull for the same image...Per picture, You are using a 20 GB vdisk image in total.... That too small for your current work load...(50 Min thess days...) 100 for log spam and other protections...SO, You should increase the vdisk size to fix your space issues...Lets review an example where docker with only 20 GB being too small:Example I pull local AI that docker image alone is now 15 GB, Local AI needs can be space taxing and high... with an 20 GB docker image the continer alone will not report the full 15 GB... adationaly 15 GB when there is a docker update to download. Docker build image and pull data takes up and adational space and leaves behind temp data. I've hit my 20 GB before the first docker update... let alone trying to run the example docker due to space...SO, now, You can see where a 20 GB vdisk is to small! 15 GB (not including the container run sizes, logs and other docker data for just the 1 Docker...)To fix... Run docker prune commands to clear temp data and build caches in docker...https://docs.docker.com/reference/cli/docker/system/prune/To resolve increase your vdisk docker image...Stop docker change 20 GB to 50 at least 100 preferred... then turn docker on.
June 3, 20251 yr Community Expert With a few containers it's easy to fill the default 20GB these days. I would increase it by 20GB, not more at a time as too much is just wasted space on your precious SSDs. Also would warn a bit earlier if the image filling up is due to a configuration error. Edited June 3, 20251 yr by Kilrah
June 3, 20251 yr Author Community Expert Thanks @bmartino1 I have just looked and my cache disk only has 50Gb of space because I have a few large VMs and its only 500Gb SSD, so I really need to get a 1Tb SSD.So, in the meantime I will try to increase docker.img to 50Gb - which should still leave 20Gb on my cache disk.Thanks for the advice.
June 3, 20251 yr Author Community Expert 19 minutes ago, bmartino1 said:Run docker prune commands to clear temp data and build caches in docker...https://docs.docker.com/reference/cli/docker/system/prune/I have started all my dockers to make sure none that are parked get deleted, so was going to run "docker system prune -a --volumes" - is this executed from an SSH connection (PuTTy) to the UnRAID server, or somewhere else?Also, I noted what @Kilrah said, so will expand from 20Gb top 40Gb 🤞Sorry if this is a stupid question... but just don't want to execute it incorrectly and destroy my server!Thanks
June 3, 20251 yr Community Expert start all dockers in unraid and run the system prune not volume prune... as we want it to delete all and anything that is not running.see script:https://forums.unraid.net/topic/178033-bmartino1-user-scripts/#findComment-1478647
June 3, 20251 yr Author Community Expert 1 hour ago, bmartino1 said:see script:https://forums.unraid.net/topic/178033-bmartino1-user-scripts/#findComment-1478647I looked at your script, but have never created an executable bash script on UnRAID, only in Ubuntu - although I imagine its the same process (?!?!)For ease/speed I was just going to run the commands individually... so just to be 100% sure I am running the correct commands...I will open an SSH session to the UnRAID server and then from the command line run;docker image prune -fFollowed by docker system prune -f --volumesDoes that look correct?Thanks
June 3, 20251 yr Community Expert yes the original post has the correct commands as well. a plugin existing called user scripts where you can add and run scripts via the web ui.the docker docs go over multiple command types, but I found running the scritp (even a copy paste will work in a ssh puty shell to unraid.Apologies if i wasn't being vewry clear. I'm reenforced that you need to make sure you are running mutiple prune commands... the system prune command and its variations.docker image prune -fis different thendocker system prune -f --volumesdocker image prune -f is the the docker pull files docker system prune -f --volumes are the docker voumes created and left behind form unused dockersboth take up space that is not reported via the docker container size button in the unriad web uiIt depends on what your targeting. If you also used unraid as a docker build there is docker build prune. docker prune build commands as well.what temp docker data your target vs the commands you need to run. It can be hard to pinpoint this data.I recommend running portatin and live connect. to seee examples and the adational data.as example:I have off and unused dockers that exist this is the temp data that is filling the drive. These commands will delete the Unused images and data.Similar with docker volumes:you can install the docker portainer via the CAthis will give you another docker interaction system to help mange and use dockers on unraid. (Especial for those who may be using compose dockers...)
June 3, 20251 yr Author Community Expert Thanks thats very useful...I had completely forgotten about "User Scripts" - so I reinstalled it and added your script;#!/bin/bash # Script to prune dangling Docker images and clean up echo "Starting Docker maintenance..." #Docker Unraid Check if dangling images exist docker rmi $(docker images --quiet --filter "dangling=true") # Prune dangling Docker images echo "Pruning dangling Docker images..." docker image prune -f # Automatically prune unused containers, networks, and volumes echo "Pruning unused containers, networks, and volumes..." docker system prune -f --volumes echo "Finished Docker maintenance."When it ran, it gave an initial error;I assume that this actually means that there are no dangling images to delete :)But says it recovered 0B... so looks like there wasn't any wasted space.So I will shut down the dockers and increase the docker.img size to 40G to give it enough space to work correctly. If/when I get a 1Tb SSD for the cache drive, I will increase it to 100G.Thanks for the help and advice. Edited June 3, 20251 yr by SliMat
June 3, 20251 yr Community Expert 6 minutes ago, SliMat said:So I will shut down the dockers and increase the docker.img size to 40G to give it enough space to work correctly. If/when I get a 1Tb SSD for the cache drive, I will increase it to 100GExceeding 20GB is not that unusual if you have a lot of docker containers, but if you still run out of space with 40GB I would start suspecting you have some misconfigured containers. You should never need anything like 100GB.
June 3, 20251 yr Author Community Expert 1 minute ago, itimpi said:Exceeding 20GB is not that unusual if you have a lot of docker containers, but if you still run out of space with 40GB I would start suspecting you have some misconfigured containers. You should never need anything like 100GB.Thanks - hopefully 40Gb will sort it out, for now :)
June 3, 20251 yr Author Community Expert Oddly, have set docker to 40Gb;Container Size shows;But frustratingly my Deluge Docker still wont show the WebUI... it was working earlier and when I restarted the docker I couldnt get on the WebUI... so I was hoping enlarging the docker.img would help :(Guess I need to look elsewhere to fix this LOL
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.