Is there a way I can connect to the postgresdb which is running in the docker as part of camunda 8 self managed from my local application?
Camunda 8 doesn’t use Postgresql in the same way that Camunda 7 did. The DB in Camunda 8 is RocksDB, and is NOT accessible. If you need process information, you’ll need to set up an exporter (which you would have done for Operate and Optimize, which use the Elasticsearch DB).
The Postgres instance in your image is for Keycloak.