Mount Postgres data to Windows host directory
问题 I want to ensure my Postgres data (using Linux based image) persist, even after my Windows host machine restart. I tried to follow the steps How to persist data in a dockerized postgres database using volumes docker-compose.yml volumes: - ./postgres_data:/var/lib/postgresql/data However, I'm getting error waiting for server to start....FATAL: data directory "/var/lib/postgresql/data/pgdata" has wrong ownership HINT: The server must be started by the user that owns the data directory. stopped