Internally, container images have a layered structure,
with each layer representing a filesystem diff produced by a corresponding RUN
, COPY
, or ADD
instruction in its Dockerfile.
However, when a container is created from an image,
its filesystem appears as a standard Linux directory structure.
Usually, it's a responsibility of the runtime to mount the image layers as a container filesystem,
but sometimes, a need to manually extract the packaged filesystem 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 9,000 engineers who receive insightful learning materials straight to their inbox