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.
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.