Mounting host drive (Windows)

I have a PostgreSQL database (data) on an external USB 3 drive that I used with a host installation of Postgres 12. I wanted to migrate that a container so I got the postgres:12 image and created the container by mounting the external drive as /mnt/y. I’m using Docker Desktop in WSL2 mode.

  • In my distro I can see the content of /mnt/y just fine.
  • If I inspect my container config I can see that /mnt/y/postgresql/12/data is mounted on /var/lib/postgresql/data as expected.

However when I go look into the /vat/lib/postgresql/data path I see a brand new database that has been created. I don’t understand what can be missing. I guess someone has come into the same kind of problem?