ApsaraDB / PolarDB-for-PostgreSQL

A cloud-native database based on PostgreSQL developed by Alibaba Cloud.
https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/
Apache License 2.0
2.91k stars 488 forks source link

docker部署htap实例,如何挂载数据目录, #366

Closed Wangdamao01 closed 1 year ago

Wangdamao01 commented 1 year ago

映射目录权限777,启动报错,提示如下报错 -v /data/polardb:/home/postgres

报错 image

polardb-bot[bot] commented 1 year ago

Hi @Wangdamao01 ~ Thanks for opening this issue! 🎉

Please make sure you have provided enough information for subsequent discussion.

We will get back to you as soon as possible. ❤️

Wangdamao01 commented 1 year ago

启动指令 docker run -itd --restart=always --cap-add=SYS_PTRACE --privileged=true -p 5432:5432 -v /data/polardb:/home/postgres --name polardb_pg_htap polardb/polardb_pg_local_instance:htap bash

mrdrivingduck commented 1 year ago

@Wangdamao01 We have refactored the usage of our image, now you can mount an empty directory as a volume into the container, and keep this data after the container is no longer running . Refer to the document here.

mrdrivingduck commented 1 year ago

/close