Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker images eats up lots of space?

docker ps -aq

Shows only 7-9 images.

/var/lib/docker/graph

shows me n number of images.

When I create a file, I get write error due to system full error. I tried to create symbolic link. but I cannot able to move all the docker things.

Is it good to remove everything under /var/lib/docker/graph? What are the other possibilities than creating symbolic link and extending disk? I would prefer deleting unnecessary things.

<none>                 <none>              02a16288ef14        6 days ago          773.3 MB
<none>                 <none>              21a606deee7e        6 days ago          773.3 MB
<none>                 <none>              8a38f2888018        6 days ago          773.2 MB
<none>                 <none>              f41395b7637d        6 days ago          773.3 MB
<none>                 <none>              8b82d707167c        6 days ago          773.3 MB
like image 478
Gibbs Avatar asked Dec 12 '22 01:12

Gibbs


1 Answers

To get rid of "dangling" images, run the following:

$ docker rmi $(docker images -q -f dangling=true)

That should clear out all the images marked "none". Be aware however, that images will share base layers, so the total amount of diskspace used by Docker will be considerably less than what you get by adding up the sizes of all your images.

like image 185
Adrian Mouat Avatar answered Dec 28 '22 07:12

Adrian Mouat