Export docker windows container

Hi,
I wanted to backup the container and uninstall docker desktop completely, however for windows container it doesn’t seem to be supported:

docker export mycontainer >c:\temp\mycont235.tar
Error response from daemon: the daemon on this operating system does not support exporting Windows containers

any ideas?
thanks.

I have never used docker export, except when I learned about the feature. You should never save anything in a container without external volumes, so you don’t need to export a container. You can move the image and the data to another machine or use it on the same machine again and create a container with the same parameters. Since I never needed to export a container, I didn’t know it was not supported by windows containers, but the error message seems to be pretty clear, so I don’t think there is anything to do :slight_smile:

Thanks,

I tried to create a volume also earlier with docker desktop but it’s empty, my understanding was this is for saving data?

In the past if I uninstalled docker desktop all was gone.

I just want to keep everything as I have now.
Sorry all this bit confusing…

thanks

If you uninstall the entire Docker Desktop, you could lose named and anonymous volumes. I can’t speak from experience as I’m a Linux user and I don’t use Windows containers. Also Docker Desktop is for development, so the data would usually not be as important as in production. You can follow Microsoft’s documentation for running Windows containers without the Desktop: Prepare Windows operating system containers | Microsoft Learn

Or you can try bind mounts instead of volumes when the data is on the host and not in the Docker image. Data on volumes in a container would be copied to the host first. It doesn’t happen when simply bind mounting the folder.

I wrote about volumes here: Everything about Docker volumes - DEV Community

It was mainly about Linux containers, but I forgot I mentioned volumes of Windows containers too. If the uninstaller deletes the base directory, data will be lost. Bind mount could be used with directories anywhere on the filesystem, which would not be affected by uninstalling Docker Desktop.

thanks. the problem I experienced in the past is that all is completely lost.
Also, for my porpuse I need docker desktop because when I tried to run New-BcContainer helper it just failed sayin dockerd not found or something like that.
I have also tried to instasll chocolatey version of it.
Ahh anyway thanks for trying to help

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