Dockerコンテナのログを表示するには、docker logs [コンテナID] コマンドを使います。

> docker logs e932c2c7dffe
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 20
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
2018-11-23 17:02:52.818 UTC [46] FATAL: data directory "/var/lib/postgresql/data" has wrong ownership
2018-11-23 17:02:52.818 UTC [46] HINT: The server must be started by the user that owns the data directory.
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"


docker logs | Docker Documentation