You can't decide what database to use for a container, its developers choose an engine (and sometimes a version) and code for that specific combination.
This is why it's best to keep database containers separate even if multiple apps use Postgres, for example, because it might not be the same version of Postgres, or may be configured differently.
There isn't that much overhead by doing so, and in return you usually benefit from the developer helping you install their database more easily.
Redis is a key-value database, it's optimized for looking up pairs of data very fast. Postgres, Maria, SQLite are relational databases, they're good for arranging data in tables where you can sort and filter it and set up relations between tables.
There are also many other types of databases which are optimized for various data arrangements and use cases. To decide which to use when you're developing your own app you have to think about your data very carefully to figure out your needs.
But the reason Postgres is used so often is that it's an excellent engine and can probably do almost anything you want so if you're ever in doubt, pick Postgres.