I am also experiencing this issue when attempting to run Postgres within a Docker container. I did a bit of digging and it appears that the Docker for Windows client (1.12.0-rc4-beta19) is mounting the volumes using CIFS and is passing a slew of options:
Of particular interest are uid, gid, noforceuid, noforcegid, and nounix. I haven’t poked around at this yet but it seems as if we are getting stuck with uid=0,gid=0 which corresponds to root:root (as @greut pointed out).
In my experience mapping uid/gid between Windows and Linux can be pretty painful due to differences between the POSIX and NTFS ACL schemes. One potential solution could be more granular management of shares and mount options. I would be very interested to hear others’ opinions on this issue and any potential solutions.