Interview Prep/Docker/Registries, Tagging & Supply Chain

What does `crane flatten` or `docker buildx build --squash` do for supply chain?

AdvancedProductionRegistries, Tagging & Supply Chain
Answer

Flattening collapses layers into one, removing deleted-but-present data (a leaked-then-deleted secret would be gone from the new image, though not from the old tag in the registry). It breaks layer reuse and caching, so only do it for special artifacts. The real fix for leaks is rotation plus preventing them with secret mounts.

All Docker questions Roadmap: Docker & containers

More on Registries, Tagging & Supply Chain