Docker Image Save Doesn't Export Valid Image Tar Files

Issue Type: Docker Export Not WOrking
OS Version: Windows 11 Enterprise/26100.4061
App Versions:
Docker Desktop: 4.41.2
Docker Version: Docker version 28.1.1, build 4eba377

Steps To Reproduce:
I noticed a situation where if I export a RabbitMQ image from a command line with the following:

docker save -o rabbitmq.tar rabbitmq:3.13.7-management

It saves a 18KB tar file.

This seemed strange because I was able to successfully run the RabbitMQ using Docker Compose so it doesn’t seem completely borked.

When I do a image inspect on my machine for the RabbitMQ image I get the following:

C:\Users\some.user>docker image inspect rabbitmq:3.13.7-management
[
    {
        "Id": "sha256:ec7eba274b5c9daf28fde3890a69f147d20543382c938e94fff83208b6f28c0d",
        "RepoTags": [
            "rabbitmq:3.13.7-management"
        ],
        "RepoDigests": [
            "rabbitmq@sha256:ec7eba274b5c9daf28fde3890a69f147d20543382c938e94fff83208b6f28c0d"
        ],
        "Parent": "",
        "Comment": "",
        "DockerVersion": "",
        "Author": "",
        "Config": null,
        "Architecture": "",
        "Os": "",
        "Size": 114460041,
        "GraphDriver": {
            "Data": null,
            "Name": "overlayfs"
        },
        "RootFS": {},
        "Metadata": {
            "LastTagTime": "2025-06-12T13:01:06.493109899Z"
        },
        "Descriptor": {
            "mediaType": "application/vnd.oci.image.index.v1+json",
            "digest": "sha256:ec7eba274b5c9daf28fde3890a69f147d20543382c938e94fff83208b6f28c0d",
            "size": 7828
        }
    }
]

On another persons machine he gets:

C:\Users\other.user\workspaces\fusionx-thinclient>docker image inspect rabbitmq:3.13.7-management
[
    {
        "Id": "sha256:7ec25fc26b4c64ce9826eebfef5bd4e925770b0ed25f9349de185641cf059fdc",
        "RepoTags": [
            "rabbitmq:3.13.7-management"
        ],
        "RepoDigests": [
            "rabbitmq@sha256:ec7eba274b5c9daf28fde3890a69f147d20543382c938e94fff83208b6f28c0d"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-09-20T21:15:09Z",
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "15671/tcp": {},
                "15672/tcp": {},
                "15691/tcp": {},
                "15692/tcp": {},
                "25672/tcp": {},
                "4369/tcp": {},
                "5671/tcp": {},
                "5672/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/opt/rabbitmq/sbin:/opt/erlang/bin:/opt/openssl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "ERLANG_INSTALL_PATH_PREFIX=/opt/erlang",
                "OPENSSL_INSTALL_PATH_PREFIX=/opt/openssl",
                "RABBITMQ_DATA_DIR=/var/lib/rabbitmq",
                "RABBITMQ_VERSION=3.13.7",
                "RABBITMQ_PGP_KEY_ID=0x0A9AF2115F4687BD29803A206B73A36E6026DFCA",
                "RABBITMQ_HOME=/opt/rabbitmq",
                "HOME=/var/lib/rabbitmq",
                "LANG=C.UTF-8",
                "LANGUAGE=C.UTF-8",
                "LC_ALL=C.UTF-8"
            ],
            "Cmd": [
                "rabbitmq-server"
            ],
            "Image": "",
            "Volumes": {
                "/var/lib/rabbitmq": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "org.opencontainers.image.ref.name": "ubuntu",
                "org.opencontainers.image.version": "24.04"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 251474201,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/04427fa029f958c595876d265583db6b7ccacf0d53e4d8cbca1444cae225db08/diff:/var/lib/docker/overlay2/afb2596e4bdb7bbd27711642a7aca2991812007e1c59dac39c20e9b864f65341/diff:/var/lib/docker/overlay2/81387a7209273fbf80ed6f8c67ddc2db3954b4734b40210237ea0fadfac431d8/diff:/var/lib/docker/overlay2/52c9bf662cc1ba36b382c559df73fadee08bc14737279ee1e14f522e04e5e9f0/diff:/var/lib/docker/overlay2/d01f290b57204e1239439dc53f3d7fc9c0b3733823c9972119b1cf41d5ca113d/diff:/var/lib/docker/overlay2/7b76d70d4e588b1af4b7db85a2c8a30d2029b955804ddee705b87704a55e4d6e/diff:/var/lib/docker/overlay2/20431731ecd92dcd7e130460136fe0e29b0026887d809f0bf9e78852bf5b0e6b/diff:/var/lib/docker/overlay2/203623c4cdb46999a7841aa7c225997b6efc965c34f343b7647298b3ed04e62c/diff:/var/lib/docker/overlay2/f946179b09a71409972ee3963b8d744d304516822f8a745184e4a1601cab54ed/diff",
                "MergedDir": "/var/lib/docker/overlay2/f4f16d3569be9636ffd439ce4e866ea6d61b6507963ecd8245c310857be0fd13/merged",
                "UpperDir": "/var/lib/docker/overlay2/f4f16d3569be9636ffd439ce4e866ea6d61b6507963ecd8245c310857be0fd13/diff",
                "WorkDir": "/var/lib/docker/overlay2/f4f16d3569be9636ffd439ce4e866ea6d61b6507963ecd8245c310857be0fd13/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:a8346d259389bc6221b4f3c61bad4e48087c5b82308e8f53ce703cfc8333c7b3",
                "sha256:97809685661b179df3aeca8d89178334cd05656162236ab4492b01bf6cfd9f55",
                "sha256:a5174e7d02b798ac3d7c0ca0df3bf5c9f039b03078029a019d368c3cab8c7795",
                "sha256:d6e7160dde5adbfcad0ceba4fc7b674838bc805dbc4d8fb9d17a9ee9e8727a11",
                "sha256:9d34a0eba478baba6bb1e781071a91cae4ec17933a94f2166872f5c0977cd83e",
                "sha256:7c8b243e135b6bde044465345d2d67c7e3f48f30ac06424a972d281e7a9c4466",
                "sha256:fb5e51d26618b00691462153cb77604b326dc2b0fa7b07982b49f122e720856a",
                "sha256:61b4210edfe3669fb7cef3b7a107ff12de132b8decb7296afc25a2ee6fa22d09",
                "sha256:abd6ea119f42a6b07d19e0b647df915a2b7923a7bb1b727076310915067d0bfc",
                "sha256:077ae6ad1f1c89d4d72804d97309a71e3d89be9d1e3efaaa0c10c96beedfc6c3"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

The image exports successfully on his machine. No matter how many times I delete the image, pull it and retry works. Any idea what might be going on?

The first output is what you get when you have the “Containerd image store” enabled. I enabled it now but I could export the same images. Even the same version of the rabbitmq image, so something more must be going on.

Have you tried to check the content of the 18KB file? That could give us more ideas about what happpened. I can imagine some issues with the API that returns an error message which is streamed into the file instead of the actual image.

I used the same Docker desktop version on my Windows. I guess the only difference is that my Windows is a Windows 11 Pro, not Enterprise, but that should not matter.

When you export images, where do you run the command? In Powershell or in a WSL distribution? And have you tried exporting another image? I think it is likely that you did, but I have to ask.

Update:

After checking the outputs again, this is not right

So for some reason, the filesystem is not returned.

update 2:

Okay, I’m not sure what is happening, but now my docker command on Windows cannot regognize image names, only the image IDs. When I list the images, I see the rabbitmq image pulled, but docker image inspect works only on the ID.

Can you try inspecting and exporting with the ID, just to see if it is related to your issue?

update 3:

My Docker Desktop works again. I noticed that Docker Desktop went to power saver mode and I believe the docker command should have woken it up, but after I clicked on the GUI I saw it, quit Docker Desktop, started again, and it worked again.

I don’'t know if it was a known issue, but one more thing you can do is updating Docker Desktop to the latest 4.42.

I also relaized that Docker Desktop 4.41.2 is known to be broken on Windows 11 with the WSL2 backend v2.5.7. Sometimes it started, sometimes it didn’t on my enterprise Windows at work, but it worked after upgrading to 4.42. So even if your issue is different, upgrading might help, but let me know if you try and doesn’t work.

The 18KB file contains “blobs” folder with 2 files (b8f57f2d282e151d0bd3131710f581ad1080d53cdb7cb970421c914f2180a309 at 3kb and ec7eba274b5c9daf28fde3890a69f147d20543382c938e94fff83208b6f28c0d at 8kb).

The root folder has and index.json file with the contents:

{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[{"mediaType":"application/vnd.oci.image.index.v1+json","digest":"sha256:ec7eba274b5c9daf28fde3890a69f147d20543382c938e94fff83208b6f28c0d","size":7828,"annotations":{"containerd.io/distribution.source.docker.io":"library/rabbitmq","io.containerd.image.name":"docker.io/library/rabbitmq:3.13.7-management","org.opencontainers.image.ref.name":"3.13.7-management"}}]}

It also contains a manifest.json with the contents:

[{"Config":"blobs/sha256/7ec25fc26b4c64ce9826eebfef5bd4e925770b0ed25f9349de185641cf059fdc","RepoTags":["rabbitmq:3.13.7-management"],"Layers":["blobs/sha256/d9d352c11bbd3880007953ed6eec1cbace76898828f3434984a0ca60672fdf5a","blobs/sha256/5ec6b6bb1d8f765f202a3e35e2081f5e55b596d43356f5aa0444c02d5f75caae","blobs/sha256/57a0bbeef412b8183456626600feac1df12eaa307e9077fe081877fc4264561a","blobs/sha256/ebf88ec8072b56044072f8cb5992c5c59cc1a9d972ac08adb4010f29bed92e84","blobs/sha256/6d3b37af4a9bb950b05e4bae7feb23ef852451acea9393cbcd069f2823455b55","blobs/sha256/08d7fea163ec06b617ea675e767e0762b54ef9768a945335281b8d6929cc2cc2","blobs/sha256/70333378947029e3d88708ca038aca37b860a779ac4af3efc7e0a665d44de937","blobs/sha256/9a4a8a3a7511ac6d2ab53c7613b2590ff9222d1c5432d6907d44f5089138dd5d","blobs/sha256/e62cfb71f12ed31d30420c7024c37462c79ef05ca4fc562304136fc234a481a3","blobs/sha256/d143c5cad55378f072a388c0e7d9f98beae8cae964de0ff488e0c67dd739e20d"]}]

and finally a oci-layout file with the contents:

{"imageLayoutVersion":"1.0.0"}

Doing a wsl -v (to get the wsl version I get):

C:\Users\michael.lambert>wsl -v
WSL version: 2.4.13.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5716
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.4061

Exporting an image with the RabbitMQ docker image SHA256 gives the same result.

Or do you mean a RabbitMQ image without the “management” suffix?

We can continue the discussion here, but I don’t think I will be able to solve this, so you could also report it as a bug

Before you report it, you should probably also update to the latest Docker Desktop, because if nobody can reproduce it with that, it could be the first they ask you to do so they can continue debugging with the latest version.

You could also run diagnostics with the “upload” option so you can share your diagnostics ID with the Docker team on gitHub

https://docs.docker.com/desktop/troubleshoot-and-support/troubleshoot/#diagnose-from-the-terminal

If you open an issue on GitHub, it would be great if you could link that here, so other users (including me) can follow the discussion there too.

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