文章目录
- 一. Mac
- 1.1 docker-compose.yaml
- 1.2 部署
- 1.3 卸载
- 4. 连接
- 二. Win10
- 2.1 docker-compose.yaml
- 2.2 部署
- 2.3 卸载
参考官方文档 基于单机文件系统部署
一. Mac
1.1 docker-compose.yaml
mkdir -p /Users/wanfei/docker-compose/polardb-pg && cd /Users/wanfei/docker-compose/polardb-pg
cat <<EOF> /Users/wanfei/docker-compose/polardb-pg/docker-compose.yaml
version: '3'
services:
polardb-pg:
restart: always
image: polardb/polardb_pg_local_instance
container_name: polardb-pg
environment:
POLARDB_USER: root
POLARDB_PASSWORD: root
TZ: Asia/Shanghai
volumes:
- /Users/wanfei/docker-compose/polardb-pg/data:/var/polardb
ports:
- 54320-54322:5432-5434
EOF
默认数据库:
postgres
;默认用户名:root
1.2 部署
docker-compose -f /Users/wanfei/docker-compose/polardb-pg/docker-compose.yaml up -d
1.3 卸载
docker-compose -f /Users/wanfei/docker-compose/polardb-pg/docker-compose.yaml down
4. 连接
二. Win10
2.1 docker-compose.yaml
mkdir -p /root/i/docker-compose/polardb-pg && cd /root/i/docker-compose/polardb-pg
cat <<EOF> /root/i/docker-compose/polardb-pg/docker-compose.yaml
version: '3'
services:
polardb-pg:
restart: always
image: polardb/polardb_pg_local_instance
container_name: polardb-pg
environment:
POLARDB_USER: root
POLARDB_PASSWORD: root
TZ: Asia/Shanghai
volumes:
- /root/i/docker-compose/polardb-pg/data:/var/polardb
ports:
- 54320-54322:5432-5434
EOF
默认数据库:
postgres
;默认用户名:root
2.2 部署
docker-compose -f /root/i/docker-compose/polardb-pg/docker-compose.yaml up -d
2.3 卸载
docker-compose -f /root/i/docker-compose/polardb-pg/docker-compose.yaml down