Windows下Docker dify 安装报错
FATAL: data directory "/var/lib/postgresql/data/pgdata" has invalid permissions
两个容器没有起来,看一下日记:
2025-03-05 17:29:59 initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
2025-03-05 17:31:01 2025-03-05 09:31:01.111 UTC [57] FATAL: data directory "/var/lib/postgresql/data/pgdata" has invalid permissions
2025-03-05 17:31:01 2025-03-05 09:31:01.111 UTC [57] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
2025-03-05 17:31:01 child process exited with exit code 1
2025-03-05 17:31:01 initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
2025-03-05 17:32:02 creating subdirectories ... ok
2025-03-05 17:32:02 selecting dynamic shared memory implementation ... posix
2025-03-05 17:32:02 selecting default max_connections ... 20
2025-03-05 17:32:02 selecting default shared_buffers ... 400kB
2025-03-05 17:32:02 selecting default time zone ... UTC
2025-03-05 17:32:02 creating configuration files ... ok
2025-03-05 17:32:02 2025-03-05 09:32:02.874 UTC [58] FATAL: data directory "/var/lib/postgresql/data/pgdata" has invalid permissions
2025-03-05 17:32:02 2025-03-05 09:32:02.874 UTC [58] DETAIL: Permissions should be u=rwx (0700) or u=rwx,g=rx (0750).
2025-03-05 17:32:02 child process exited with exit code 1
2025-03-05 17:32:02 initdb: removing contents of data directory "/var/lib/postgresql/data/pgdata"
2025-03-05 17:32:03 running bootstrap script ...
发现目次权限问题;
目次的当前权限设置
PostgreSQL 对其数据目次有严格的权限要求。通常,数据目次应该归 postgres 用户和组所有,并且权限应该设置为 700(即只有所有者有读、写和执行权限)。
假如权限设置不正确,你需要进行调整。
1.修改dify/docker/docker-compose.yaml配置文件
- 改成:
- volumes:
- /volumes/db/data:/var/lib/postgresql/data
然后继续执行:
E:\deepseek\dify-1.0.0\docker>docker compose up -d
再看都已经好了
这时候发现还不行
docker-plugin_daemon-1 也在报错
修改 docker-compose.yaml 中 docker-plugin_daemon-1 的配置
- ./volumes/plugin_daemon:/app/storage
修改为:
- /volumes/plugin_daemon:/app/storage
然后再执行下令跟新
E:\deepseek\dify-1.0.0\docker>docker compose up -d
已经没有了报错日记
这时候再访问:发现已经好了Difyhttp://localhost/install
注册之后发现已经好了
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |