How to start PostgreSQL server in Docker
Running PostgreSQL in a Docker container offers flexibility and ease of use, especially for development and testing environments. It eliminates the need to install PostgreSQL directly on your machine, ensuring a clean and isolated environment. With Docker, you can easily manage different PostgreSQL versions, share configurations, and replicate setups for consistent development workflows.
Starting PostgreSQL on Docker
Check logs
Note. Password is "change-me"
Connect to DB from within the Docker container (no need to have the PostgreSQL client installed)
Connect to DB from local (if the PostgreSQL client is installed)