Rebuilding your container image frequently
I have seen many customers using the latest
tag and forgetting to run their container image pipeline for months, thanks to the simple fact that .NET Framework applications are usually treated as legacy, and development isn’t active anymore. So, it becomes an obsolete image, successfully built with the application months before.
This comes at an expensive storage cost. Let’s understand the basics of a Docker image. When you build a container image, the image becomes immutable and a digest Secure Hash Algorithms (SHA) hash signs all the layers.
If you run docker inspect
to inspect the mcr.microsoft.com/windows/servercore:ltsc2019
image, you will probably see two hashes under RootFS
. These are the layers that compose the ltsc2019
image released in June 2022:
Figure 12.2 – Docker inspect mcr.microsoft.com/windows/servercore:ltsc2019 (June 2022)
Let’s assume you built your application...