I would like to provide a bit of context before asking my questions:
I've been working on Windows/Linux for years, and recently I was having a good time with WSL2.
My Windows machine isn't powerful, running Docker consumes more than 70% of my RAM, while WSL2 consumes barely 5%, so I've grow used to avoid docker although I still like it and use it when I boot on Linux.
The reason why I "need" WSL or Docker is to keep my system clean. I use to experiment a lot on the command line, and I install a lot of apps for testing. Windows doesn't take long to get messy, there is a lot of residue and trash after installing and uninstalling applications. Linux is a bit better, but not much, recently I just broke my wifi driver because I installed a Wacom driver... I benefit a lot from having multiple "workspaces", creating different "containers" on WSL or Docker, attaching, working, installing, detaching, and my system is untouched. :)
Since my laptop is dying, I decided to give the MacBook a try, so I'm getting a M1 Air, it will be delivered in some days so I'm trying to getting prepared.
Sorry if some of those questions sounds absurd:
- How can I have a "safe" development environment on a MacBook?
- There is something lightweight like WSL for Mac? Or is Docker/Podman the way to go?
- Is chroot enough to create "subsystems" to work with? Is it possible to create a Chroot with some small OS Image like Alpine?
(I know that chroot uses the actual kernel and is not the same as a virtualization, so it's not possible running "other OS", but if there is some OS Image using a Mac kernel or something compatible, it could work, right? There is such an OS/image?)
- Is it possible to install BSD in any of those containers inside a Mac?
There is any other tool or solution for keeping my system clean and safe?
I've heard about Vagrant, I'm not sure what it is, I'm searching about it, but I'm having a hard time trying to discover about any other alternative tools... Docker always show up on my searches and I'm not sure if there is other good/better alternatives for Mac.
Thank you for taking your time for reading this!
Edit: looks like I could use xhyve, it can be very fast (at least bhyve is) and I can use it to create FreeBSD virtual machines. I'm not sure if it is the best option though, I'll wait for any contributions/suggestions and I will experiment with xhyve later this week.