I'm far more familiar with Vagrant than Docker, so there may be Docker solutions for these problems. But I use Vagrant to:
- Test my software on a "fresh" Linux installation, to ensure it doesn't have any hidden dependencies
- Test my software with different filesystem layouts and (soon) different filesystems, without having to pollute my own filesystem with hundreds of test files
- Automatically install a set of global commands in the VM (such as "b" to do a complete build) and display help text as soon as a user runs "vagrant ssh", so a new developer can quickly get up to speed
It's been pretty good!