PostgreSQL with docker ownership issue

I've finally figured out what went wrong when I tried to use a volume for PostgreSQL data.

I had no idea that we used a docker-compose.override.yml, which declare a volume with a Windows path.

So here is a working solution to have PostgreSQL on Docker for Windows, with persisted data :

version: '2'

services:
  postgres:
    image: postgres:11.5
    ports:
      - 5432:5432
    volumes: 
      - pgdata:/var/lib/postgresql/data
      - pgconf:/etc/postgresql
      - pglog:/var/log/postgresql

volumes:
  pgdata:
    driver: local
  pgconf:
    driver: local
  pglog: 
    driver: local

(no additional command required)