Connect to my local Postgres database

Hello all,

I am trying to connect to my local PostgreSQL database with a local docker image of metabase and I keep getting "Hmm, we couldn't connect to the database. Make sure your Host and Port settings are correct"

These are the credentials I'm using:
host: localhost
port: 5432

and the db name, username and password that works when I connect with PGadmin

I am very new to metabase, so if this question isn't quite write I apologize.

You must change your host to: host.docker.internal instead of localhost when using docker
This was answered in another thread ,Thanks.