I'm running a self-hosted service on Windows 11 using WSL2, and it's blowing up with data — I'm expecting it to surpass 1 TB in just a few months. Does anyone have tips for managing such a massive amount of Docker data effectively?
2 Answers
You might want to consider whether WSL/Docker Desktop is the right choice for your setup. The large disk space usage is often an issue with WSL/Hyper-V rather than Docker itself. There are guides available that explain how to shrink a virtual disk after it's been used, which could help. Alternatively, you could switch to a more dedicated solution like VMware Workstation and run your Docker instances on a proper Linux distro, which could alleviate a lot of these disk issues. Just a thought!
If you're dealing with heavy Docker data in WSL, you might want to check which VHDX file you're using, specifically the docker-desktop-data one. Use the command `du -h /` inside your WSL shell to see where all the space is going. After that, run some Docker commands like `docker prune` to clean up unused volumes and containers. Additionally, look up ways to shrink your virtual disk, as this is more about Windows, Hyper-V, and WSL rather than Docker itself.
I've just got one simple Nextcloud container, and I'm dealing with a ton of data too.

That's not true! I've already done all the disk shrinking, and I didn't find anything new from searching.