Skip to content

Commit

Permalink
docs: add privileged flag for docker run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdrivingduck authored and polardb-bot[bot] committed Dec 5, 2024
1 parent 35199b3 commit d4f5477
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you have Docker installed already,then you can pull the instance image of P
```bash
# pull the instance image and run the container
docker pull polardb/polardb_pg_local_instance:15
docker run -it --rm polardb/polardb_pg_local_instance:15 psql
docker run -it --cap-add=SYS_PTRACE --privileged=true --rm polardb/polardb_pg_local_instance:15 psql
# check
postgres=# SELECT version();
version
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ PolarDB for PostgreSQL 采用了基于 Shared-Storage 的存储计算分离架
```bash
# 拉取镜像并运行容器
docker pull polardb/polardb_pg_local_instance:15
docker run -it --rm polardb/polardb_pg_local_instance:15 psql
docker run -it --cap-add=SYS_PTRACE --privileged=true --rm polardb/polardb_pg_local_instance:15 psql
# 测试实例可用性
postgres=# SELECT version();
version
Expand Down
4 changes: 2 additions & 2 deletions polar-doc/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pull the [local instance image](https://hub.docker.com/r/polardb/polardb_pg_loca
```bash:no-line-numbers
# pull the instance image and run the container
docker pull polardb/polardb_pg_local_instance:15
docker run -it --rm polardb/polardb_pg_local_instance:15 psql
docker run -it --cap-add=SYS_PTRACE --privileged=true --rm polardb/polardb_pg_local_instance:15 psql
# check
postgres=# SELECT version();
version
Expand All @@ -32,7 +32,7 @@ postgres=# SELECT version();
```bash:no-line-numbers
# pull the instance image and run the container
docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
docker run -it --rm registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15 psql
docker run -it --cap-add=SYS_PTRACE --privileged=true --rm registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15 psql
# check
postgres=# SELECT version();
version
Expand Down
6 changes: 6 additions & 0 deletions polar-doc/docs/deploying/db-localfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instan

```bash:no-line-numbers
docker run -it --rm \
--cap-add=SYS_PTRACE --privileged=true \
--env POLARDB_PORT=5432 \
--env POLARDB_USER=u1 \
--env POLARDB_PASSWORD=your_password \
Expand All @@ -61,6 +62,7 @@ docker run -it --rm \

```bash:no-line-numbers
docker run -it --rm \
--cap-add=SYS_PTRACE --privileged=true \
--env POLARDB_PORT=5432 \
--env POLARDB_USER=u1 \
--env POLARDB_PASSWORD=your_password \
Expand All @@ -81,6 +83,7 @@ docker run -it --rm \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
-p 54320-54322:5432-5434 \
-v ${your_data_dir}:/var/polardb \
polardb/polardb_pg_local_instance:15
Expand All @@ -91,6 +94,7 @@ docker run -d \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
-p 54320-54322:5432-5434 \
-v ${your_data_dir}:/var/polardb \
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
Expand All @@ -106,6 +110,7 @@ docker run -d \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
--network=host \
-v ${your_data_dir}:/var/polardb \
polardb/polardb_pg_local_instance:15
Expand All @@ -116,6 +121,7 @@ docker run -d \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
--network=host \
-v ${your_data_dir}:/var/polardb \
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
Expand Down
4 changes: 2 additions & 2 deletions polar-doc/docs/zh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ footer: Apache 2.0 Licensed | Copyright © Alibaba Group, Inc.
```bash:no-line-numbers
# 拉取镜像并运行容器
docker pull polardb/polardb_pg_local_instance:15
docker run -it --rm polardb/polardb_pg_local_instance:15 psql
docker run -it --cap-add=SYS_PTRACE --privileged=true --rm polardb/polardb_pg_local_instance:15 psql
# 测试可用性
postgres=# SELECT version();
version
Expand All @@ -32,7 +32,7 @@ postgres=# SELECT version();
```bash:no-line-numbers
# 拉取镜像并运行容器
docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
docker run -it --rm registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15 psql
docker run -it --cap-add=SYS_PTRACE --privileged=true --rm registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15 psql
# 测试可用性
postgres=# SELECT version();
version
Expand Down
6 changes: 6 additions & 0 deletions polar-doc/docs/zh/deploying/db-localfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ docker pull registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instan

```bash:no-line-numbers
docker run -it --rm \
--cap-add=SYS_PTRACE --privileged=true \
--env POLARDB_PORT=5432 \
--env POLARDB_USER=u1 \
--env POLARDB_PASSWORD=your_password \
Expand All @@ -61,6 +62,7 @@ docker run -it --rm \

```bash:no-line-numbers
docker run -it --rm \
--cap-add=SYS_PTRACE --privileged=true \
--env POLARDB_PORT=5432 \
--env POLARDB_USER=u1 \
--env POLARDB_PASSWORD=your_password \
Expand All @@ -81,6 +83,7 @@ docker run -it --rm \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
-p 54320-54322:5432-5434 \
-v ${your_data_dir}:/var/polardb \
polardb/polardb_pg_local_instance:15
Expand All @@ -91,6 +94,7 @@ docker run -d \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
-p 54320-54322:5432-5434 \
-v ${your_data_dir}:/var/polardb \
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
Expand All @@ -106,6 +110,7 @@ docker run -d \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
--network=host \
-v ${your_data_dir}:/var/polardb \
polardb/polardb_pg_local_instance:15
Expand All @@ -116,6 +121,7 @@ docker run -d \

```bash:no-line-numbers
docker run -d \
--cap-add=SYS_PTRACE --privileged=true \
--network=host \
-v ${your_data_dir}:/var/polardb \
registry.cn-hangzhou.aliyuncs.com/polardb_pg/polardb_pg_local_instance:15
Expand Down

0 comments on commit d4f5477

Please sign in to comment.