I'm working at a Java consulting firm where we develop custom projects for multiple clients. Each project has its own stack of tools which means we need a separate development environment for each project. Currently, we create and distribute VM images manually, which means the state of a VM is lost every time it is updated. Also, a VM is around 20-50GB in size, which makes distribution a hassle.

We've been looking into several alternatives like
– compilers, IDEs and tools in docker containers via Dockerfiles / docker-compose.yml
– codespaces / VS Code devcontainers (seems to work only for the VS Code ecosystem)
– Vagrant + Ansible
– declarative environments with nix-shell / NixOS

Do you need multiple development environments? How do you create and maintain your development environments? Can you recommend a particular approach with regard to easy provisioning and updates?