Cannot find Docker images in Windows 11

Hello,
I am running the latest Docker (updated today) for Windows on Windows 11. I have looked pretty hard for the location in which my Docker images are stored, but with no luck. For what it’s worth, Docker tells me that, “You are using the WSL 2 backend, so resource limits are managed by Windows.”

I have checked a number of sites, including this one in this forum, but they have not helped. The guidance on the site just mentioned suggests to look a the folder hyper-v VM which does not exist on my PC. Another site suggests “C:\Users\xxxx\AppData\Local\Docker\wsl” which exists but does not have my images. Ditto for another suggested location: “C:\Program Files\Docker\Docker\resources\wsl”. This guidance was for Windows 10, so maybe there’s a very different organization for Windows 11? What is most frustrating is that it seems to me that I should be able to simply search for the file name, which I assume is either under “NAME” or “IMAGE ID” in Docker Desktop, but this turns up nothing. Any help would be much appreciated.

In case of Docker Desktop containers will not run on your host machine. Images, containers, volimes are in a virtual machine and Docker Desktop just gives you a Docker client configured to have access to the Docker daemon. This is why you can’t find anything searching for IDs and filenames.

Have you found anything there? For example a vhdx file which is a disk image for the WSL2 virtual machine?

1 Like

Thank you for the quick response! Yes, at that location I have a “data” and a “distro” folder, each of which contains the same .vhdx file. Only one file and the same file in each folder. Does that make sense? Thanks!

The images are stored in \wsl.localhost\docker-desktop-data\data\docker\image (you can directly open the UNC in the explorer) on Windows 11.

It is not recommend to modify/delete anything from there.

2 Likes

Thank you for the response! Unfortunately, I have no folders named “wsl.localhost” or “docker-desktop-data” on my C drive. Thanks.

Of course you have no such a folder on your harddisk.
Please try to follow what I wrote: copy the exact path into the explorer (win+e key) address bar.

Oh, I see what happend. A \ is missing. IT should be \\wsl.localhost\docker-desktop-data\data\docker\image

I didn’t notice that it’s not shown when not quoted as inline code.

2 Likes

I forgot about the mountable filesystem, but there is no “data” folder in my case either so it could be somewhere else in the latest Docker Desktop.

Possible. I just installed the latest Docker Desktop to get the UNC path. Maybee it was different on older versions?

Though, what I remember that on Win10 the “host part” was just \\wsl instead of `\wsl.localhost.

I have the latest Docker Desktop on Windows 11, but that is a mistery I can’t solve today :slight_smile: .

1 Like

Yes! That leads me to overlay2 => imagedb => content => sha256, all within “Network”. Within the sha256 folder are 2 files, each corresponding to an image id. They are very small files in the kb range as opposed to the Mb and Gb sized files referenced in DockerDesktop, so I gather these are links of some kind to the actual files located remotely.

Thanks very, very much. As you can tell, I am a newbie with a lot to learn.

May I ask what your goal is?

I get the feeling that your lack of understaidng for the technology made you come up with a solution that somone experienced with docker wouldn’t. I’d like to make sure this is not going to get one of the “problem of the minute” kind of threads where people run in the wrong direction and try to solve problems caused by doing so.

1 Like

Sure, and sorry for the delay. I am under the weather with Covid these days and am not much good for anything besides collapsing on the sofa and binge-watching The Wire. I am a retired molecular biologist and am continuing to analyze the data that my lab obtained from a next-generation sequencing project – a ChIP-seq project, to be exact. I had an excellent bioinformatician working on the project back in the day. She basically completed the analysis, but I need to revisit the work and perhaps tweak some parameters in order to bring the study to publication. As I no longer have her services, I have taken it upon myself to learn the basics of the work flow she followed. I have therefore spent some months learning Python and am now learning how to apply the analysis software. As part of this effort, I am now following a course on Udemy that teaches the ChIP-seq workflow. I am at a point in the course where the instructor is emphasizing the importance of working in virtual environments (for the typical reason of keeping track of software versions). He compares the pros and cons of two approaches: virtual environments in Miniconda versus containers in Docker. Given that this may well be my one and only venture into the bioinformatics of ChIP-seq analysis, it seems likely that I would find Miniconda venvs sufficient for my needs. Nonetheless, he teaches both, and so I am just following the course in this respect.

Thank you the very extended explaination :slight_smile:

Though, my question was more aimed toward the questions why you need to know where the images are and what is it you try to archive with accessing them on the filesystem.

I assume your objective is to modify an existing image. The content of the image folder is not ment to be changed manually. The intended approach is to build a new image using a Dockerfile and docker build. Idealy your collegue left you notes on how to create a new image with new sources.

If it’s about snopping around in the image, you can simply create a container with a command like docker run --rm -ti --entrypoint /bin/sh {if needed more arguments} imagename to get a terminal inside the container.

1 Like

DID you get any further?

My problem I can’t build an image on MS windows 11 from their (MS files ) repo that with errors for trying to remove file that don’t exists… its so frusting. Never had this problem in Linux but in windows !! and the lasted Docker app it’s dun founding but forced do it all on widows 11 which wasted a week of trying to figure out and got no answer from anyone… I think it a docker and windows 11 issue but who to contact …

Thank you for the info about browsing to the image files via wsl.host from windows explorer. That was a key insight.

My goal differs from the OP, but hopefully there’s enough overlap this is still on topic: I want to modify the compose yaml file for one of my containers. How is that done?

Normally you have a compose file on your Windows host, and run docker compose up in the folder where the compose file is located, or at least reference it by using the -f argument followed by a path, to deploy the resources to the docker engine. Compose files are just another user interface to manage configurations for container, volumes and networks. Docker compose parses this configuration and issues commands to the docker api, the same way like docker run would do.

Thus said, I am not sure how much sense it makes to look for a compose file in the Docker Desktop WSL2 distribution.

Thank you for taking the time to respond meyay.

The problem I’m having is because I started with Docker Desktop and used it to pull the image, as opposed to something like git clone ... and so on from a shell, is that I’ve no idea where in my system the compose is located. I’m thinking it’s probably best to back up and forget about desktop and work my through some commmand line examples. At least then I know where files are located.

I can’t follow your though. But I can tell you that docker compose ls will show where the compose file it was deployed from was located. Again: this is something that happens solely on the client side, not on the server side. The compose file is processed locally and translated into api calls, it is not uploaded somewhere to be processed on the backend.

Maybe nowhere. It’s not clear to me how you created the container. You only mentioned you used Docker DEsktop to pull the image. If you also started the container from that image using the GUI of Docker Desktop, there is no compose file.