согласен предыдущим оратором. 😉
Нужно папку с хоста прокинуть в доккер чтобы пж туда базейку писал Ра сшарил диск написал ямл version: '3' services: db: image: postgres restart: always volumes: - c:\DATA:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=postgres ports: - 5432:5432 Ругаецца: PS D:\docker\pg> docker-compose up Creating pg_db_1 ... done Attaching to pg_db_1 db_1 | The files belonging to this database system will be owned by user "postgres". db_1 | This user must also own the server process. db_1 | db_1 | The database cluster will be initialized with locale "en_US.utf8". db_1 | The default database encoding has accordingly been set to "UTF8". db_1 | The default text search configuration will be set to "english". db_1 | db_1 | Data page checksums are disabled. db_1 | db_1 | fixing permissions on existing directory /var/lib/postgresql/data ... ok db_1 | creating subdirectories ... ok db_1 | selecting dynamic shared memory implementation ... posix db_1 | selecting default max_connections ... 20 db_1 | selecting default shared_buffers ... 400kB db_1 | selecting default time zone ... Etc/UTC db_1 | creating configuration files ... ok db_1 | running bootstrap script ... 2019-11-21 11:54:35.791 UTC [77] FATAL: data directory "/var/lib/postgresql/data" has wrong ownership db_1 | 2019-11-21 11:54:35.791 UTC [77] HINT: The server must be started by the user that owns the data directory. db_1 | child process exited with exit code 1 db_1 | initdb: removing contents of data directory "/var/lib/postgresql/data"
Обсуждают сегодня