One option is to use a virtual machine, a replica of production, that ensures that the environments are the same. There are a couple of drawbacks to this option:
- It's slow, as there's a complete virtualization guest operative system that you have to boot every time you want to develop
- It's resource consuming, as you need to store a complete base layout in your disk and you need to reserve RAM memory to start it
To make things worse, having a read-only machine with read-write code is not simple and will eventually make you frustrated. Virtual machines are the only option when you need an environment that you cannot have unless the entire machine is virtualized, for example, when you have a macOS laptop and you need ...