How to delete unused docker images ?
-
Hi community,
I noticed that every time we install and delete an application, the docker image is not deleted on the server hard drive. This poses a problem in the size of the backup I do daily, I use Scaleway S3 Object Storage with 75GB free and I don't want to exceed this quota.
Anyone to explain how to delete docker images of uninstalled and unused applications please ?
Thanks
-
@fortytwo unused docker images are purged on app installation. The apps also share some base image layers to preserver space. Also there are docker images for addons and service containers. The details about used space are not live values, so they might lag few hours behind actual usage.
-
Thanks for your answer @nebulon always there to help us, thank you so much :))
I haven't reinstalled any other app for several weeks now and I'm using Bitwarden and Nextcloud exclusively, yet the size of the Docker storage in the topic image doesn't move. I can't believe it's only Nextcloud and Bitwarden images, it seems way too big!
Can you point me to the path to the folder Docker images please ?
-
@fortytwo actually the roughly about 5Gb seems correct, given that these are two apps and all the service containers. It is not easily possible to figure out the image size from the filesystem as such, you have to use the docker cli tool for that. Generally if you would like to move the images to a different disk, there is information about this at https://docs.cloudron.io/storage/#docker-images
-
@fortytwo It's more than the 2 app's images. Docker images also includes what cloudron calls "service images" which is background services like email, databases (postgresql, mysql/mariadb, etc etc), and other services running in background.
-
@fortytwo said in How to delete unused docker images ?:
Scaleway S3 Object Storage with 75GB free
Is this for your backup? Cloudron does not backup images (and code), just your data. From your screenshot, it's only going to take 1.13G (nextcloud) + 6.5M (bitwarden) + 520K (box) + 212K (email). So, it's way less than 2GB per backup. If you store like 30 full backups, it's still under your object storage.
We use what is called immutable infrastructure for this if you want to learn more.