Internally, container images have a layered structure - some layers represent filesystem diffs, some represent configuration changes, and some represent metadata. However, when a container is created from an image, its filesystem already looks like a regular Linux directory structure. Usually, it's a responsibility of the runtime to mount the image as a container fs, but sometimes, a need to manually extract image contents into a local folder may arise. In particular, this may be useful for debugging purposes.
In this challenge, you will need to unpack the filesystem of a container image into a local directory.
Make sure you don't use docker save
- it dumps the original layered structure of the image!
The image is already pulled for you - you can find it in the output of the docker images
command.
Store its filesystem in the ~/imagefs
directory.
Ah, and the image is not really runnable, so you may need to be a bit creative.
Hint 1 💡
Feeling lost? Check out this short tutorial - How To Extract Container Image Filesystem Using Docker.
Level up your Server Side game — Join 7,800 engineers who receive insightful learning materials straight to their inbox