<p>Asked in <a href="https://stackoverflow.com/questions/65358738/is-there-any-way-to-configure-skaffold-to-build-images-on-my-local-docker-daemon/65395223?noredirect=1#comment120508501_65395223">a different question</a>:</p>
<blockquote>
<p>why does <code>skaffold</code> need two tags to the same image?</p>
</blockquote>

<p>During deployment, Skaffold rewrites the image references in the Kubernetes manifests being deployed to ensure that the cluster pulls the the newly-built images and doesn't use stale copies (read about <code>imagePullPolicy</code> and some of the issues that it attempts to address).  Skaffold can't just use the computed image tag as many tag conventions do not produce unique tags and the tag can be overwritten by another developer and point to a different image.  It's not unusual for a team of devs, or parallel tests, to push images into the same image repository and encounter tag clashes.  For example, <code>latest</code> will be overwritten by the next build, and the default <code>gitCommit</code> tagger generates tags like <code>v1.17.1-38-g1c6517887</code> which uses the most recent version tag and the current commit SHA and so isn't unique across uncommitted source changes.</p>
<p>When pushing to a registry, Skaffold can use the image's <em>digest</em>, the portion after the <code>@</code> in <code>gcr.io/my-project/image:latest@sha256:xxx</code>. This digest is the hash of the image configuration and layers and uniquely identifies a specific image.  A container runtime ignores the tag (<code>latest</code> here) when there is a digest.</p>
<p>When loading an image to a Docker daemon, as happens when deploying to minikube, the Docker daemon does not maintain image digests. So Skaffold instead tags the image with a second tag using a <em>computed digest</em>.  It's extremely unlikely that two <em>different</em> images will have the same computed digest, unless they're the same image.</p>
<p>Tags are cheap: they're like symlinks, pointing to an image identifier.</p>
