macOS testing on Desktop: Docker containers vs. Homebrew installation Often I test some stuff on my MacBook. Mostly database and data store related stuff (MongoDB, MariaDB, Postgres). I install the software with Homebrew and test.

I wonder if I should switch to docker? What are pros and cons Homebrew vs. Docker for testing things on local Desktop?
One of the advantages of using Docker would be that you can easily run tests with different versions of the (DB) apps, which could be quite difficult with Homebrew (some apps don't easily support multiple versions installed on the same system).