According to postgres official docker doc , one way to persist data is to have a mount folder on host operating system. So I ran the following command:
docke