113: OpenIM 离线部署设计

1. 基础镜像

以下是您需要的基础镜像及其版本:

  • wurstmeister/kafka
  • redis:7.0.0
  • mongo:6.0.2
  • mysql:5.7
  • wurstmeister/zookeeper
  • minio/minio

使用以下命令拉取这些基础镜像:

docker pull wurstmeister/kafka
docker pull redis:7.0.0
docker pull mongo:6.0.2
docker pull mysql:5.7
docker pull wurstmeister/zookeeper
docker pull minio/minio

2. OpenIM 与 Chat 镜像

详细了解 OpenIM 和 Chat 的版本管理及存储: version.mdopen in new window

OpenIM 镜像

docker pull ghcr.io/openimsdk/openim-server:<version-name>

Chat 镜像

  • 执行以下命令来拉取镜像:
docker pull ghcr.io/openimsdk/openim-server:<version-name>

3. 镜像存储选择

存储库

  • 阿里云:registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server
  • Docker Hub:openim/openim-server

版本选择

  • 稳定版:如 release-v3.2 (或 3.1、3.3)
  • 最新版:latest
  • main 的最新版:main

4. 版本选择

您可以选择以下版本:

  • 稳定版:如 release-v3.2
  • 最新版:latest
  • main 分支的最新版:main

5. 离线部署步骤

  1. 拉取镜像: 执行上面的 docker pull 命令将所需的所有镜像拉取到本地。
  2. 保存镜像:
docker save -o <tar-file-name>.tar <image-name>
  1. 获取代码: 克隆仓库:
git clone https://github.com/OpenIMSDK/openim-docker.git

或从Releasesopen in new window下载代码。

  1. 传输文件: 使用 scp 将所有镜像和代码传输到内网服务器。
scp <tar-file-name>.tar user@remote-ip:/path/on/remote/server

或选择其他传输方式如硬盘。

  1. 导入镜像: 在内网服务器上:
docker load -i <tar-file-name>.tar
  1. 部署:进入 openim-docker 仓库目录,按照 README 文档指导进行部署。

  2. 使用 Docker-compose 部署:

docker-compose up -d

# 验证
docker-compose ps

备注: 若您使用的是 Docker 的版本 20 之前,需确保已经安装了 docker-compose

6. 参考链接

OpenIM Offline Deployment Design

1. Base Images

Below are the base images and their versions you'll need:

  • wurstmeister/kafka
  • redis:7.0.0
  • mongo:6.0.2
  • mysql:5.7
  • wurstmeister/zookeeper
  • minio/minio

Use the following commands to pull these base images:

docker pull wurstmeister/kafka
docker pull redis:7.0.0
docker pull mongo:6.0.2
docker pull mysql:5.7
docker pull wurstmeister/zookeeper
docker pull minio/minio

2. OpenIM & Chat Images

For detailed understanding of version management and storage of OpenIM and Chat: version.mdopen in new window

OpenIM Image

docker pull ghcr.io/openimsdk/openim-server:<version-name>

Chat Image

  • Execute the following command to pull the image:
docker pull ghcr.io/openimsdk/openim-server:<version-name>

3. Image Storage Selection

Repositories:

  • Alibaba Cloud: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server
  • Docker Hub: openim/openim-server

Version Selection:

  • Stable: e.g. release-v3.2 (or 3.1, 3.3)
  • Latest: latest
  • Latest of main: main

4. Version Selection

You can select from the following versions:

  • Stable: e.g. release-v3.2
  • Latest: latest
  • Latest from main branch: main

5. Offline Deployment Steps

  1. Pull images: Execute the above docker pull commands to pull all required images locally.
  2. Save images:
docker save -o <tar-file-name>.tar <image-name>
  1. Fetch code: Clone the repository:
git clone https://github.com/OpenIMSDK/openim-docker.git

Or download the code from Releasesopen in new window.

  1. Transfer files: Use scp to transfer all images and code to the intranet server.
scp <tar-file-name>.tar user@remote-ip:/path/on/remote/server

Or choose other transfer methods such as a hard drive.

  1. Import images: On the intranet server:
docker load -i <tar-file-name>.tar
  1. Deploy: Navigate to the openim-docker repository directory and follow the README guide for deployment.
  2. Deploy using Docker-compose:
docker-compose up -d

# Verify
docker-compose ps

Note: If you're using a version of Docker prior to 20, make sure you've installed docker-compose.