I am using personal desktop docker version 4.43.2 on a windows 11pro laptop, but the default memory size, which is also the size of docker_data.vhdx, becomes only 1.29GB and I can’t adjust it via setting/resources/advance since there is nothing I can change. The following is screenshot of setting/resources in my desktop docker GUI. Besides I also can’t find any file named “setting.json” or “.wslconfig” in my laptop. And while running, I noticed that when I build image and container, it costs my local storage space instead of storage in docker.
I am using my working laptop for this project, is that a potential reason of issue?
When we are talking about memory, we usually mean RAM. Memory is also often used for the storage of mobile devices, but less likely for disks in PCs or laptops. It was confusing first, but I assume you only meant to write about the disk size. And exactly as @meyay wrote, the amount you quoted is not the maximum size of the disk. It is the used size. If I remember correctly, the maximum is 1 terabyte by default in Docker Desktop for Windows., because this is the default in WSL, even if you don’t have that size on the physical disk (I’M not sure about that and I don’t have my Windows laptop at the moment).
Since you mention the “memory” being the same as the size of the vhdx, I assume you saw the size of the virtual disk file and thought it would be the.final size. The virtual disk can grow until it reaches the limit. And since the growing virtual disk is on your physical host, you will see you have less space on the host when more file and data is added to Docker desktop.
It can grow up to the limit, or until the host harddisk is full. The later case can have negative implications, as it can prevent the host os from working properly.
Thanks for all your reply and explanations! I did misunderstand the desktop docker memory structure. I misunderstood that since it reported error about not enough memory space when I tried to build image in my docker. But the issue was gone after I restart my laptop.