

Discover more from Bitesized Engineering
Hey there! đ
A new week and another deep-dive inside the container space. And this time Iâm focused on answering the question that puzzled me forever - whatâs INSIDE the Container Image? And as usual - we go with image first and the details below ;)
(click on image to expand)
If you were to just get started with containers, chances are that youâd be told to ârun a container by pojnting it to image URLâ. Hereâs an example from Microsoft docs on how to start your first container:
# Pull the image first (i.e. download it to your local system)
docker pull mcr.microsoft.com/windows/nanoserver:ltsc2022
# Start your container and have fun :)
docker run -it mcr.microsoft.com/windows/nanoserver:ltsc2022
If you execute above two on your Windows system, chances are youâll end up inside a container:
Now the real question is - whatâs inside that image that we just unwrapped into a full-blown filesystem? Luckily, there are two ways to find out - Docker export and containerdâs image export.
Sadly, for reasons completely mysterious to me, former doesnât really work:
So I had to resort to containerdâs image export:
Perfect! Now you untar it and you can explore the content inside:
Weâll discuss the actual content in the next article. What you need to know though is that the content follows the OCI Image specification (OCI stands for Open Container Initiative and itâs a standard that defines how container-related stuff should work; thereâll be another article about it as well!).
Lastly, Iâd like to introduce you to a tool called dive
. Itâs a free to use tool that can be used to explore the contents and some other attributes of the images:
dive.exe mcr.microsoft.com/windows/nanoserver:ltsc2022
Dive is an extremely powerful tool which is especially useful when you end up with multiple layers abd want to inspect if you can do some space-savings. But more about Layers and other details in the next article!
Until then, if you havenât already, you might want to subscribe to this newsletter:
If you missed previous articles, here are the last three I published: