Skip to content

Commit

Permalink
Readme (oceanbase#2037)
Browse files Browse the repository at this point in the history
* add command to run docker instance using image from quay.io and ghcr.io
  • Loading branch information
chris-sun-star authored Jul 1, 2024
1 parent 67b0b54 commit 71056a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 9 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)。
Expand Down

0 comments on commit 71056a7

Please sign in to comment.