postgres 環境を docker で構築します。もし同時に PHP 環境が必要な場合は下記も参照してください。 Docker で作る Nginx + PHP7 + Xdebug 環境 docker コンテナとして postgres を扱うメリット docker を使用すれとローカル環境に複数のデータベースを作成、使用するのが容易になります。同じ設定で postgres のバージョンだけ変更することも出来、不具合の検証や pg_dump、pg_restore といった postgres のバージョンに依存した問題を解決しやすいです。データベース練習用としても最適です。 Docker の設定ファイル postgreSQL のようなメジャーなシステムは大抵、公式が docker image を用意してくれています。dockerfile では image の読み込みと日本語対応を行います。