You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/04/16 08:51:50 UTC

[shardingsphere] branch master updated: Update release documents of Docker image (#16876)

This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 21b8b418342 Update release documents of Docker image (#16876)
21b8b418342 is described below

commit 21b8b4183423a39c18c3e71daedb40aea203ae42
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Sat Apr 16 16:51:44 2022 +0800

    Update release documents of Docker image (#16876)
---
 docs/community/content/contribute/release.cn.md | 25 ++++++++++---------------
 docs/community/content/contribute/release.en.md | 25 ++++++++++---------------
 2 files changed, 20 insertions(+), 30 deletions(-)

diff --git a/docs/community/content/contribute/release.cn.md b/docs/community/content/contribute/release.cn.md
index ab597866739..1846faa7a33 100644
--- a/docs/community/content/contribute/release.cn.md
+++ b/docs/community/content/contribute/release.cn.md
@@ -520,34 +520,29 @@ git branch -d ${RELEASE.VERSION}-release
 
 本地安装 Docker,并启动服务。
 
-5.2 编译 Docker 镜像
-
+(如果使用 Docker Desktop,可以跳过该步骤)配置 QEMU:
 ```shell
-git checkout ${RELEASE.VERSION}
-cd ~/shardingsphere/shardingsphere-distribution/shardingsphere-proxy-distribution/
-mvn clean package -Prelease,docker
+docker run --privileged --rm tonistiigi/binfmt --install all
 ```
 
-5.3 给本地 Docker 镜像打标记
+参考文档:[Docker Buildx: Build multi-platform images](https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images)
 
-通过 `docker images` 查看到 IMAGE ID,例如为:e9ea51023687。
+5.2 登录 Docker Registry
 
 ```shell
-docker tag e9ea51023687 apache/shardingsphere-proxy:latest
-docker tag e9ea51023687 apache/shardingsphere-proxy:${RELEASE.VERSION}
+docker login
 ```
 
-5.4 发布 Docker 镜像
+5.3 构建并推送 ShardingSphere-Proxy Docker image
 
 ```shell
-docker login
-docker push apache/shardingsphere-proxy:latest
-docker push apache/shardingsphere-proxy:${RELEASE.VERSION}
+git checkout ${RELEASE.VERSION}
+./mvnw -pl shardingsphere-distribution/shardingsphere-proxy-distribution -B -Prelease,docker.buildx.push clean package
 ```
 
-5.5 确认发布成功
+5.4 确认发布成功
 
-登录 [Docker Hub](https://hub.docker.com/r/apache/sharding-proxy/) 查看是否有发布的镜像。
+查看 [Docker Hub](https://hub.docker.com/r/apache/shardingsphere-proxy/) 是否有发布的镜像,确保镜像同时支持 `linux/amd64` 和 `linux/arm64`。
 
 **6. GitHub版本发布**
 
diff --git a/docs/community/content/contribute/release.en.md b/docs/community/content/contribute/release.en.md
index 185634eda30..94352e3ba6a 100644
--- a/docs/community/content/contribute/release.en.md
+++ b/docs/community/content/contribute/release.en.md
@@ -527,34 +527,29 @@ Update `${PREVIOUS.RELEASE.VERSION}` to `${RELEASE.VERSION}` in README.md and RE
 
 Install and start docker service
 
-5.2 Compile Docker Image
-
+(You may skip this step if you are using Docker Desktop) Configure QEMU:
 ```shell
-git checkout ${RELEASE.VERSION}
-cd ~/shardingsphere/shardingsphere-distribution/shardingsphere-proxy-distribution/
-mvn clean package -Prelease,docker
+docker run --privileged --rm tonistiigi/binfmt --install all
 ```
 
-5.3 Tag the local Docker Image
+Refer to: [Docker Buildx: Build multi-platform images](https://docs.docker.com/buildx/working-with-buildx/#build-multi-platform-images)
 
-Check the image ID through `docker images`, for example: e9ea51023687
+5.2 Login Docker Registry
 
 ```shell
-docker tag e9ea51023687 apache/shardingsphere-proxy:latest
-docker tag e9ea51023687 apache/shardingsphere-proxy:${RELEASE.VERSION}
+docker login
 ```
 
-5.4 Publish Docker Image
+5.3 Build and push ShardingSphere-Proxy Docker image
 
 ```shell
-docker login
-docker push apache/shardingsphere-proxy:latest
-docker push apache/shardingsphere-proxy:${RELEASE.VERSION}
+git checkout ${RELEASE.VERSION}
+./mvnw -pl shardingsphere-distribution/shardingsphere-proxy-distribution -B -Prelease,docker.buildx.push clean package
 ```
 
-5.5 Confirm the successful release
+5.4 Confirm the successful release
 
-Login [Docker Hub](https://hub.docker.com/r/apache/sharding-proxy/) to check whether there are published images
+Go to [Docker Hub](https://hub.docker.com/r/apache/shardingsphere-proxy/) and check whether there is a published image. And make sure that the image supports both `linux/amd64` and `linux/arm64`.
 
 **6. Publish release in GitHub**