Docker: How To Extract Image Filesystem Without Running Any Containers
A container image is a combination of layers where every layer represents some intermediary state of the final filesystem. Such a layered composition makes the building, storage, and distribution of images more efficient. But from a mere developer's standpoint, images are just root filesystems of our future containers. And we often want to explore their content accordingly - with familiar tools like cat
, ls
, or file
. Let's try to see if we can achieve this goal using nothing but the means provided by Docker itself.