So I had this in my head for a long time, that I can just build a rootfs using docker and load it in WSL.
I tried it yesterday, and now I have a CLI tool to build my WSL image using Dockerfiles.
I'm not sure if it helps anyone, but I wanted to share it, just in case.
Cheers.
I went looking for the "Why?" and couldn't find it, I think others would like to hear this too =)
Best thing I could come up with was "declarative WSL setup like Nix/Fedora Silverblue"
So this would have solved my prob: have a dockerfile or image and up an wsl env for it. Given how great wsl is these days (i used to have Linux and Mac as daily drivers, now wsl) I guess this sort of thing will become more and more relevant
It's totally unmaintained and forgotten :D
In general, what I do now to generate WSL images is to docker run a container, and then export it to a .tar, finally, install that tar, is that easy.
However, if I had your tool installed, for sure I would use that for ease of use.
Also, the idea to do it the other way around WSL -> docker image is really nice.
Thanks for sharing!
* In WSL2 I don't need to worry about, ports, mounts and data persistence (I think this is possible in docker but it needs more setup work)
* I don't need docker desktop running
in the end I think that both can solve the problem, I myself prefer wsl for my day to day tasks.
Thanks for sharing this.