Today when creating container images a base image is first created and then all images are build up on that. This mean that all layers will be rebuilt for all small changes.
If we rethink how we build the images we can make fever layer changes between updates I think.
Default image is build as today based on node:20-slim and that will not be changed, instead the FROM image should be an build-time-args.
If we take the dotnet image, this is today based on default image and then adding all the tools up on that, that have the impact as fast the default image is changed every tool need to be installed again and creating new layers for the container images. If we instead changing the dotnet image to be build on the node:20-slim image and build that as dotent-base, then to build the complete dotnet image we run the default build but with the from-build-time-args as dotnet-base.
If we change to do this, then the base layers will be the same as long the nodejs or dotnet aren't changed and we get less layers to download for the updates.
I haven't tested this so it may be that it not will work and we still get all layers touched as we doing today.