Readme (#2037)
* add command to run docker instance using image from quay.io and ghcr.io
This commit is contained in:
parent
67b0b54d28
commit
71056a7950
10
README.md
10
README.md
@ -70,17 +70,25 @@ obd demo
|
||||
|
||||
## 🐳 Start with docker
|
||||
|
||||
**Note**: We provide images on [dockerhub](https://hub.docker.com/r/oceanbase/oceanbase-ce/tags), [quay.io](https://quay.io/repository/oceanbase/oceanbase-ce?tab=tags) and [ghcr.io](https://github.com/oceanbase/docker-images/pkgs/container/oceanbase-ce). If you have problems pulling images from dockerhub, please try the other two registries.
|
||||
|
||||
1. Start an OceanBase Database instance:
|
||||
|
||||
```shell
|
||||
# Deploy a mini standalone instance.
|
||||
docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d oceanbase/oceanbase-ce
|
||||
|
||||
# Deploy a mini standalone instance using image from quay.io.
|
||||
# docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d quay.io/oceanbase/oceanbase-ce
|
||||
|
||||
# Deploy a mini standalone instance using image from ghcr.io.
|
||||
# docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d ghcr.io/oceanbase/oceanbase-ce
|
||||
```
|
||||
|
||||
2. Connect to the OceanBase Database instance:
|
||||
|
||||
```shell
|
||||
docker exec -it oceanbase-ce ob-mysql sys # Connect to the root user of the sys tenant.
|
||||
docker exec -it oceanbase-ce obclient -h127.0.0.1 -P2881 -uroot # Connect to the root user of the sys tenant.
|
||||
```
|
||||
|
||||
See also [Docker Readme](https://github.com/oceanbase/docker-images/tree/main/oceanbase-ce) for more details.
|
||||
|
10
README_CN.md
10
README_CN.md
@ -70,17 +70,25 @@ obd demo
|
||||
|
||||
## 🐳 使用 docker
|
||||
|
||||
**注意**: 我们在 [dockerhub](https://hub.docker.com/r/oceanbase/oceanbase-ce/tags), [quay.io](https://quay.io/repository/oceanbase/oceanbase-ce?tab=tags) 和 [ghcr.io](https://github.com/oceanbase/docker-images/pkgs/container/oceanbase-ce) 提供镜像。如果您在从 dockerhub 拉取镜像时遇到问题,请尝试其他两个镜像库。
|
||||
|
||||
1. 启动 OceanBase 数据库实例
|
||||
|
||||
```shell
|
||||
# 部署一个mini模式实例
|
||||
docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d oceanbase/oceanbase-ce
|
||||
|
||||
# 使用 quay.io 仓库的镜像部署 OceanBase.
|
||||
# docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d quay.io/oceanbase/oceanbase-ce
|
||||
|
||||
# 使用 ghcr.io 仓库的镜像部署 OceanBase.
|
||||
# docker run -p 2881:2881 --name oceanbase-ce -e MODE=mini -d ghcr.io/oceanbase/oceanbase-ce
|
||||
```
|
||||
|
||||
2. 连接 OceanBase
|
||||
|
||||
```shell
|
||||
docker exec -it oceanbase-ce ob-mysql sys # 连接root用户sys租户
|
||||
docker exec -it oceanbase-ce obclient -h127.0.0.1 -P2881 -uroot # 连接root用户sys租户
|
||||
```
|
||||
|
||||
更多信息参考[docker 文档](https://github.com/oceanbase/docker-images/tree/main/oceanbase-ce)。
|
||||
|
Loading…
x
Reference in New Issue
Block a user