Docker Image

Contains app binaries and dependencies. Not a complete OS. No kernel, kernal mosules(eg, drivers). Small as one file, or big as a ubuntu distro with apt, and apache, php and more installed

Notes

To know the layers of docker image

docker history nginx or docker image history nginx

To see metadata of the docker image

docker inspect nginx or docker image inspect nginx

To clean up just “dangling” images

docker image prune

To clean up everything images, containers and volumes

docker system prune

To remove all unused Images

docker image prune -a

To see disk space usage by images, containers, volumes and build caches

docker system df

TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              25                  12                  6.169GB             4.648GB (75%)
Containers          45                  18                  1.802GB             1.802GB (99%)
Local Volumes       6                   0                   3.568MB             3.568MB (100%)
Build Cache         21                  0                   745.8MB             745.8MB