I’m running a docker-compose stack with the services below:
- A Jupyter notebook service
- A mlflow tracking server
- A postgresql database to stock mlflow info.
When I try to run docker-compose build and up, I get the classical “data directory “/var/lib/postgresql/data” has wrong ownership” that happened on Windows, but I’m running it on Linux and I can’t find the cause. Please, find docker-compose.yml and respective Dockerfile’s on https://www.dropbox.com/s/q1cxsk5v3nyczwe/files.tar.gz?dl=0 (I can’t upload files), and here you can see the full log:
postgres_1 | The files belonging to this database system will be owned by user “postgres”.
postgres_1 | This user must also own the server process.
postgres_1 | The database cluster will be initialized with locale “en_US.utf8”.
postgres_1 | The default database encoding has accordingly been set to “UTF8”.
postgres_1 | The default text search configuration will be set to “english”.
postgres_1 | Data page checksums are disabled.
postgres_1 | fixing permissions on existing directory /var/lib/postgresql/data … ok
postgres_1 | creating subdirectories … ok
postgres_1 | selecting dynamic shared memory implementation … posix
postgres_1 | selecting default max_connections … 20
postgres_1 | selecting default shared_buffers … 400kB
postgres_1 | selecting default time zone … Etc/UTC
postgres_1 | creating configuration files … ok
postgres_1 | running bootstrap script … 2020-07-28 19:47:30.936 UTC  FATAL: data directory “/var/lib/postgresql/data” has wrong ownership
postgres_1 | 2020-07-28 19:47:30.936 UTC  HINT: The server must be started by the user that owns the data directory.
postgres_1 | child process exited with exit code 1
postgres_1 | initdb: removing contents of data directory “/var/lib/postgresql/data”
Any help you could provide would be great. Thanks for your time and dedication.