Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Image Size bigger than total Docker installations together

Featured Replies

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:
afbeelding.png.943311a3745922ac01efa44f8bc252fa.png ~ 9586 MB

And here a sceenshot of the total file size:
afbeelding.png.93fcb8b55967010517228bad8ed964f5.png

 

Is there any way to see, or to clean up the access storage used by docker.img?

 

Edited by maxstevens2

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.

 

 

  • Author
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.

afbeelding.png.05534c9041af958a5c8a34880a2a0eb3.png

 

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.

 

 

'docker image prune'

  • Author

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 by maxstevens2

  • Author

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

  • 2 months later...
  • Author

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?

  • Author

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?

  • 3 months later...
  • Author

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 )

  • 2 weeks later...

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.

  • Author
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 by maxstevens2

Here it is:
 

/dev/loop2         30G   24G  3.4G  88% /var/lib/docker


What should i do?

Thanks.

  • Author

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 :D

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.

 

 

  • Author

Try that yes, see what it shows there.

expected behavour is this:
afbeelding.png.7e45a81145c842b0bcc5b0638203e3c0.png

 

Do note i am running unraid 6.8.3

Used portainer, deleted unused images and volumes and now it looks it is the way it should.
Thanks a lot :)

C.

  • Author

Glad to hear it works now. How do you usually install or update dockers?
The casual way is just this button:

afbeelding.png.74a2af6ea9fd03cf87d50c15424c6aff.png

Yup, that way.

  • 7 months later...
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?

  • 2 years later...

After not finding any extreme usage by any of the following commands: 

Docker Disk Usage

docker system df


Containers with Sizes

docker ps -a --size --format "table {{.ID}}\t{{.Names}}\t{{.Size}}"

 

Images with Sizes

docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}"

 


I found this way of checking for volumes with size

 

Volumes with Sizes

docker volume ls -q | xargs -I {} sh -c 'echo -n "{}: " && docker run --rm -v {}:/volume alpine du -sh /volume | cut -f1'

 

At first I did not see the output as any issue but decided that a complete prune of everything unused couldn't hurt. 

 

First MAKE SURE TO START EVERYTHIN!

 

This will remove all unused docker resources so if you want something to stay as it is make sure it is running before running this command! 

 

Prune all unused

docker system prune -a --volumes

 

After running that I ran the "Volumes with Sizes" command again and realized that `docker volume prune` would have been enough.

Hope this helps.  

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.