Ah, you want to consolidate to one machine while maintaining security isolation. Here are the main isolation approaches with their trade-offs:
Virtual Machines (VMs)
VMs provide the strongest isolation - your dev environment runs in a completely separate OS instance. If malicious code executes, it's contained within the VM and can't access your host system's banking apps or personal data.
Pros: Near-complete isolation, can snapshot/restore clean states, different OS if needed
Cons: Resource intensive (RAM/CPU overhead), slower performance, more complex backup/sync workflows
Docker Containers
Containers share the host kernel but isolate the filesystem and processes. Good for running development environments with specific package versions without affecting your host system.
Pros: Lightweight, fast startup, easy to reproduce environments, good for microservices development
Cons: Weaker isolation than VMs (kernel exploits could escape), requires learning Docker concepts, some development workflows need adjustment
User-level Sandboxing (Firejail, Bubblewrap)
These tools create restricted environments for applications using Linux namespaces and seccomp filters.
Pros: Very lightweight, fine-grained permission control, transparent to most applications
Cons: Linux-only, can break some development tools, requires careful configuration
Separate User Accounts
Create a dedicated user account for development work with restricted permissions.
Pros: Simple, built into the OS, no performance overhead
Cons: Weakest isolation, shared kernel and many system resources, determined malware could still escalate
For your use case, I'd lean toward VMs for maximum security or Docker for a good balance of security and usability. Which approach interests you most?