Docker is a great way to install Postgres in your development environment so we can run postgres on docker with persist data.
With Persistance Data.
docker run -d -p 5432:5432 \
-e POSTGRES_PASSWORD=mysuperpassword \
--name postgres \
-v pgdatavolume:/var/lib/postgresql/data postgres