Named Volume or Bind Mount?
A PostgreSQL container fails on a new host with "data directory has wrong ownership" when its data is a bind mount ./pgdata. What usually avoids this?
./pgdata
Choose one answer
Running the container with --privileged.
--privileged
A named volume, created with the ownership the image expects.
Storing the data in the container's writable layer instead.
Mounting the host directory with the SELinux :z option on every host it runs on.
:z