DockerDesktopVM.vhdx size is very big?

I noticed that the docker highly utilized disk size even if i pulled 3 images only
Docker running with hyper-v
DockerDesktopVM.vhdx reach to 200 GB
the following is output from docker system df -v

images space usage:
 

REPOSITORY                  TAG       IMAGE ID       CREATED         SIZE      SHARED SIZE   UNIQUE SIZE   CONTAINERS
provectuslabs/kafka-ui      latest    b223870a7f66   3 months ago    379.4MB   0B            379.4MB       1
confluentinc/cp-kafka       6.1.0     2cb0db7793c9   17 months ago   726MB     637.9MB       88.11MB       1
confluentinc/cp-zookeeper   6.1.0     6c3cf2de014b   17 months ago   726MB     637.9MB       88.11MB       1
 
Containers space usage:
 

CONTAINER ID   IMAGE                             COMMAND                  LOCAL VOLUMES   SIZE      CREATED        STATUS                        NAMES
d908b646b72c   confluentinc/cp-kafka:6.1.0       "/etc/confluent/dock…"   2               11.7MB    26 hours ago   Up 4 hours                    broker
60b570f4917a   confluentinc/cp-zookeeper:6.1.0   "/etc/confluent/dock…"   3               21.4kB    26 hours ago   Restarting (10) 4 hours ago   zookeeper
68ef3048c173   provectuslabs/kafka-ui            "/bin/sh -c 'java $J…"   0               32.8kB    26 hours ago   Up 26 hours                   kafka-ui

 
Local Volumes space usage:
 

VOLUME NAME                                                        LINKS     SIZE
infrastructure_kafka-data                                          1         96B
infrastructure_zk-data                                             1         424B
infrastructure_zk-txn-logs                                         1         67.11MB
2b261134437486c73f258d42c9a8bef6705b7e04faf97c2f180f2c1ae66e9031   1         0B
9b21e8be992c75aee01ee4e715abd1d4ad549145b0e95b576ec0e52c7dc82a45   1         0B
 
Build cache usage: 0B
 
CACHE ID   CACHE TYPE   SIZE      CREATED   LAST USED   USAGE     SHARED

Docker desktop version

Server: Docker Desktop 4.16.3 (96739)
Engine:
  Version:          20.10.22
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.9
  Git commit:       42c8b31
  Built:            Thu Dec 15 22:26:14 2022
  OS/Arch:          linux/amd64
  Experimental:     false
containerd:
  Version:          1.6.14
  GitCommit:        9ba4b250366a5ddde94bb7c9d1def331423aa323
runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

That seems like a default disk size. The vhdx file could be large even if it doesn’t have 200GB data inside. If it is the case, you can change the disk size in Docker Desktop at

Settings » Resources » Advanced

Note: Please, format your post as described in the below topic so we can understand your question better. I fixed your post for you this time

Thanks for formating my post. the problem here dockerdesktopVM.vhdx reach to 200GB in 2 days. do you know how to debug it?

Was it smaller when you installed Docker Desktop?

Since only Docker should use the space, it is possible that one of the containers wrote a lot of temporary files or generaed error logs. The size of the files inside containers should be visible unless it was written to the filesystem and also removed, but the json files (default logging driver) will be stored on the host (the virtual machine)

The following is Container’s Size as you see they use few megas only.

CONTAINER ID   IMAGE                             COMMAND                  LOCAL VOLUMES   SIZE      CREATED        STATUS                        NAMES
d908b646b72c   confluentinc/cp-kafka:6.1.0       "/etc/confluent/dock…"   2               11.7MB    26 hours ago   Up 4 hours                    broker
60b570f4917a   confluentinc/cp-zookeeper:6.1.0   "/etc/confluent/dock…"   3               21.4kB    26 hours ago   Restarting (10) 4 hours ago   zookeeper
68ef3048c173   provectuslabs/kafka-ui            "/bin/sh -c 'java $J…"   0               32.8kB    26 hours ago   Up 26 hours

I use DockerDesktop on windows to run linux container and setup upon hyper-v. Hyper-v create disk file called DockerDesktopVM.vhdx. File Size reach 200Gb.

I think you misunderstood my questions

I understand the current situation, but asked about how it was when you first started Docker Desktop.

I don’t think that would be included in the size of the container. Docker writes to the standard ouput and error stream which is written to json files.

One pod is in your quoted output is restarting which could easily produce a lot of log messages.

how can i purge logging data with out effect container or images ?

Containers should be deletable and recreatable any time. So if you just delete the container recreate it, that would clear the logs. In long term, you can configure logging drivers, change log rotation or send logs to an external logging server.

Images wouldn’t be affected by this.

Note that I am not sure the problem is the log, but I can’t think of anything else. Even if it is caused by the amount of log mesages, it would be better to identify which container had that amount of log and why. Using an external logging server could make it easier.