In learning how to use Docker on install I am being asked to install Docker and to make sure Hyper-V is active. The problem is that the Docker installer says to use WSL 2 instead of Hyper-V.
Are we going to use Hyper-V or are we going to use WSL 2? I thought the point was not to use VMs to reduce the requirements of processing and resource hoggery? Or am I wrong?
So to rephrase. We used to need both Hyper-V and WSL. Then we could use WSL2 only. And Hyper-V is no more needed so they will abandon it to focus on WSL2.
Docker app takes up a lot of space on my disk even tough i erase all my docker images and volumes with : docker system prune --all command.
So, I’ve noticed this big chunk of memory is stored in C:\Users<user name>\AppData\Local\Docker\wsl\data into the file ext4.vhdx.
I firstly keep on trashing that file and start fresh again and again.
But, at some point, I’d like to keep docker images and volumes locally.
Would you (UniqueNospaceShort) know how I can properly manage that without having to wipe everything ever since I want to diminish the size of memory usage?
I never had to worry about disk space myself.
But a quick lookup and a bit of reading, I gathered a few interesting links.
It turns out you are not cleaning volumes by using docker system prune and that sounds like a descent and desirable behaviour. Moreover volumes are likely outside the disk space you want to free.
The doc
Some SO topic
You may use docker image prune -a that would be doing more than docker system prune (basically pruning images, containers and networks in one command but apparently not as deeply as each specific command).
Ultimately I invite you to read that article that seems to explain more in depth.
You talk about “a lot of space” but how much is “a lot” ?
It is simply using the space it has to for the assets you are actually using.