run postgres docker medium code example
Example 1: docker run postgres locally
$ docker run -d --name my_postgres -v my_dbdata:/var/lib/postgresql/data -p 54320:5432 postgres:11
Example 2: docker create postgres db
# inside Dockerfile
COPY your_sql_file.sql /docker-entrypoint-initdb.d/