What does it mean that `docker push` says "Layer already exists"?
BeginnerScenarioMulti-stage builds, cache, tags and registries
Answer
Situation read → Registries store blobs by content digest.
What I'd do → Nothing; it is a feature. The registry already has that layer (from a prior push or another repo with cross-repo mount), so the client skips upload. Only the manifest and changed layers transfer.
Why → This is why stable base layers and good ordering make pushes and pulls fast.
Interview tip → Same logic speeds pulls: nodes only fetch missing layers.
More on Multi-stage builds, cache, tags and registries
Show a multi-stage Dockerfile for a Java Spring Boot app and explain what you gain.BeginnerCI rebuilds from scratch every run and takes 12 minutes. How do you bring it down?IntermediateYou tag every build `myapp:latest`. A rollback is requested. What happens?BeginnerHow do you promote an image from dev to prod registry without rebuilding?IntermediateDisk on the build server keeps filling up with images.BeginnerWhen do you use `--no-cache` and when is it a smell?Beginner