Interview Prep/Docker/Registries, Tagging & Supply Chain

Why is deploying by digest better than by tag?

IntermediateProductionRegistries, Tagging & Supply Chain
Answer

A tag can be re-pushed (accidentally or maliciously), so two nodes may run different code under the same name. A digest identifies exact content, making rollbacks, audits and caching deterministic. Use image: app@sha256:... (optionally app:1.4.2@sha256:... for readability; the digest wins).

All Docker questions Roadmap: Docker & containers

More on Registries, Tagging & Supply Chain