报错如下截图:

解决步骤:
bash
# 停掉harbor
docker-compose down
# 创建容器将数据目录挂载
docker run --rm --name test-db -it -v /data/database:/root goharbor/harbor-db:v2.11.0 bash
docker exec -it test-db bash
# 在容器内给数据目录授权
chmod 750 /root/pg15
chmow -R 999:999 /root/pg15
# 停掉临时容器,然后启动harbor-db测试
docker-compose up -d