Docker Image Size bigger than total Docker installations together


Recommended Posts

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
Link to comment

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.

 

 

  • Like 1
Link to comment
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.

 

 

Link to comment
  • 2 months later...
  • 3 months later...

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 )

Link to comment
  • 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.

Link to comment

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

Link to comment

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.

 

 

Link to comment
  • 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?

Link to comment

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.