Hello, I’ve found a bug where docker save on Docker Desktop (Windows) creates an inconsistent tarball after a docker load.
How to Reproduce:
docker load -i original.tar(This creates a new image ID, e.g.,New-ID, as expected).docker save -o new.tar my-image:latest
The Bug:
When I inspect new.tar:
manifest.json(legacy format) correctly points to theNew-ID.index.json(OCI format) incorrectly points to the manifest digest from theoriginal.tar.
The Problem (Inconsistent Behavior):
This inconsistent tarball causes different behaviors on different systems:
- On my PC (Docker Desktop, Windows):
docker load -i new.tarreads theindex.jsonand loads the OLD image. I’m stuck in a loop. - On my colleague’s PC :
docker load -i new.tarreads themanifest.jsonand loads the NEW image (New-ID).
This happens even after re-installing Docker/WSL and re-tagging the image before saving.
My Question:
Why is docker save incorrectly reusing the old index.json? How can I force Docker to generate a correct, consistent tarball on Windows?