Pros:
- Databases are cleanly separated from your system
- Identical setup for everyone (easier to debug)
- Closer to a production setup
- Easy to remove after you are done
Cons:
- A tiny bit less performant
- Install Docker
git clone https://github.com/CSEdelft/docker-dbs
cd docker-dbs
- cd into a database directory
make
(wait a minute for the database to start)make connect
- (optional)
make restore
to load database data - Do your thing.
make kill
(shutdown the database and remove the image)
On macOS you have to allow docker access into the directory, otherwise it cannot bind to the filesystem and persist database data (and won't even start). Do this in Docker->Preferences->File Sharing
.