I suppose you can run your tests in docker and just do dev work in a "good enough" replica.
I found that when I tried developing inside a clone of my Production Docker environment, I started having to change more and more things over time eg installing Xdebug etc that meant it was not the reliable test environment I hoped it would be.