How can rebuilding an existing image tag leave the previous image dangling?
The previous image automatically becomes a stopped container.
Docker converts the previous image into a named volume.
The remote registry deletes every earlier image layer.
The tag moves to the newly built image, leaving the previous image without that repository tag.