docker /var/lib/docker/overlay2 disk full
My docker overlay consume more space , no disk space, I have extended my Aws EBS two times, but no luck. Again disk full.
Currently 7 containers are running on my server.
To see the running containers
# docker ps -a
While checking the associated images with dockers instance is
So here is docker instances with images size.
How to clean unwanted images, Just run the following command.
docker prune -a
It’ will delete the unwanted & unused images on docker,
docker ps -s will show the detailed usage of each & every containers.
FYI : Don’t remove any images or containers manually, it will leads to data loss.
/var/lib/docker/containers : containers location
/var/lib/docker/overlay : Image locations
Eg : Dockers image & it’s contents
contents under ./dacad40f6fd9eacc03e60c3550c645bf15a4809bdc9a5b695c06bbdc69dea0d5 drwxr-xr-x. 5 root root 4096 May 22 13:54 diff -rw-r--r--. 1 root root 26 May 22 13:54 link -rw-r--r--. 1 root root 724 May 22 13:54 lower drwxr-xr-x. 1 root root 4096 May 22 13:54 merged drwx------. 3 root root 4096 May 29 11:01 work
The images contains some directory like link, merged & diff,
The second-lowest layer, and each higher layer, contain a file called lower, which denotes its parent, and a directory called diff which contains its contents. It also contains a merged directory, which contains the unified contents of its parent layer and itself, and a work directory which is used internally by OverlayFS.
so Just run
docker prune -a
Any doubts ping me ….!! 🙂
Good writing~.
I think “docker prune -a” need to be “docker “system” prune -a”
Thank you.
@taegukang: yep i confirm too, must be docker system prune -a , thnx