Docker save creates tarball with inconsistent index.json and manifest.json after docker load

Hello, I’ve found a bug where docker save on Docker Desktop (Windows) creates an inconsistent tarball after a docker load.

How to Reproduce:

  1. docker load -i original.tar (This creates a new image ID, e.g., New-ID, as expected).
  2. docker save -o new.tar my-image:latest

The Bug:

When I inspect new.tar:

  • manifest.json (legacy format) correctly points to the New-ID.
  • index.json (OCI format) incorrectly points to the manifest digest from the original.tar.

The Problem (Inconsistent Behavior):

This inconsistent tarball causes different behaviors on different systems:

  1. On my PC (Docker Desktop, Windows): docker load -i new.tar reads the index.json and loads the OLD image. I’m stuck in a loop.
  2. On my colleague’s PC : docker load -i new.tar reads the manifest.json and 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?

Sounds like a bug. that you ould report on GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.