Category: Database, Data, Docker

There is a need of Database in most of the software application and Postgres is one of the best option to choose. If we want to spend less time in installing, setting up and maintaining Postgres and focus on more time on software development, then running Postgres on Docker container is a great option. So, in this article, we will see how can we get up and running Postgres in 5 minutes.

In this file, we have specified service name for postgres as postgresdb and used 12.3 version of postgres, as specified in image’s tag.

Data volume is very important as it enables us to keep the data of our database in our local machine, so that even if we stop or remove postgres container, our data is always safe with us and can be used again when we start container later.

Related Articles