This is an automated email from the ASF dual-hosted git repository.
chengshiwen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git
The following commit(s) were added to refs/heads/master by this push:
new b7eec35 Add build multi-platform images for docker (#433)
b7eec35 is described below
commit b7eec359ecf46132d4ff2a65719c524c888dbd38
Author: Shiwen Cheng <[email protected]>
AuthorDate: Thu Sep 9 16:08:49 2021 +0800
Add build multi-platform images for docker (#433)
---
docs/en-us/1.3.8/user_doc/docker-deployment.md | 18 ++++++++++++++++--
docs/zh-cn/1.3.8/user_doc/docker-deployment.md | 18 ++++++++++++++++--
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/docs/en-us/1.3.8/user_doc/docker-deployment.md
b/docs/en-us/1.3.8/user_doc/docker-deployment.md
index 1ef0535..ac4d2f4 100644
--- a/docs/en-us/1.3.8/user_doc/docker-deployment.md
+++ b/docs/en-us/1.3.8/user_doc/docker-deployment.md
@@ -300,7 +300,7 @@ docker service scale
dolphinscheduler_dolphinscheduler-worker=3
### How to build a Docker image?
-#### 1. Build from the source code (Require Maven 3.3+ & JDK 1.8+)
+#### Build from the source code (Require Maven 3.3+ & JDK 1.8+)
In Unix-Like, execute in Terminal:
@@ -316,7 +316,7 @@ C:\dolphinscheduler-src>.\docker\build\hooks\build.bat
Please read `./docker/build/hooks/build` `./docker/build/hooks/build.bat`
script files if you don't understand
-#### 2. Build from the binary distribution (Not require Maven 3.3+ & JDK 1.8+)
+#### Build from the binary distribution (Not require Maven 3.3+ & JDK 1.8+)
Please download the binary distribution package
apache-dolphinscheduler-1.3.8-bin.tar.gz, download address:
[download](/en-us/download/download.html). And put
apache-dolphinscheduler-1.3.8-bin.tar.gz into the
`apache-dolphinscheduler-1.3.8-src/docker/build` directory, execute in Terminal
or PowerShell:
@@ -327,6 +327,20 @@ $ docker build --build-arg VERSION=1.3.8 -t
apache/dolphinscheduler:1.3.8 .
> PowerShell should use `cd apache-dolphinscheduler-1.3.8-src/docker/build`
+#### Build multi-platform images
+
+Currently support to build images including `linux/amd64` and `linux/arm64`
platform architecture, requirements:
+
+1. Support [docker
buildx](https://docs.docker.com/engine/reference/commandline/buildx/)
+2. Own the push permission of https://hub.docker.com/r/apache/dolphinscheduler
(**Be cautious**: The build command will automatically push the multi-platform
architecture images to the docker hub of apache/dolphinscheduler by default)
+
+Execute:
+
+```bash
+$ docker login # login to push apache/dolphinscheduler
+$ bash ./docker/build/hooks/build
+```
+
### How to add an environment variable for Docker?
If you would like to do additional initialization in an image derived from
this one, add one or more environment variables under
`/root/start-init-conf.sh`, and modify template files in
`/opt/dolphinscheduler/conf/*.tpl`.
diff --git a/docs/zh-cn/1.3.8/user_doc/docker-deployment.md
b/docs/zh-cn/1.3.8/user_doc/docker-deployment.md
index 3f668af..a8498fa 100644
--- a/docs/zh-cn/1.3.8/user_doc/docker-deployment.md
+++ b/docs/zh-cn/1.3.8/user_doc/docker-deployment.md
@@ -300,7 +300,7 @@ docker service scale
dolphinscheduler_dolphinscheduler-worker=3
### 如何构建一个 Docker 镜像?
-#### 1. 从源码构建 (需要 Maven 3.3+ & JDK 1.8+)
+#### 从源码构建 (需要 Maven 3.3+ & JDK 1.8+)
类 Unix 系统,在 Terminal 中执行:
@@ -316,7 +316,7 @@ C:\dolphinscheduler-src>.\docker\build\hooks\build.bat
如果你不理解 `./docker/build/hooks/build` `./docker/build/hooks/build.bat`
这些脚本,请阅读里面的内容
-#### 2. 从二进制包构建 (不需要 Maven 3.3+ & JDK 1.8+)
+#### 从二进制包构建 (不需要 Maven 3.3+ & JDK 1.8+)
请下载二进制包 apache-dolphinscheduler-1.3.8-bin.tar.gz,下载地址:
[下载](/zh-cn/download/download.html). 然后将
apache-dolphinscheduler-1.3.8-bin.tar.gz 放到
`apache-dolphinscheduler-1.3.8-src/docker/build` 目录里,在 Terminal 或 PowerShell
中执行:
@@ -327,6 +327,20 @@ $ docker build --build-arg VERSION=1.3.8 -t
apache/dolphinscheduler:1.3.8 .
> PowerShell 应该使用 `cd apache-dolphinscheduler-1.3.8-src/docker/build`
+#### 构建多平台架构镜像
+
+目前支持构建 `linux/amd64` 和 `linux/arm64` 平台架构的镜像,要求:
+
+1. 支持 [docker
buildx](https://docs.docker.com/engine/reference/commandline/buildx/)
+2. 具有 https://hub.docker.com/r/apache/dolphinscheduler 的 push 权限(**务必谨慎**:
构建命令默认会自动将多平台架构镜像推送到 apache/dolphinscheduler 的 docker hub)
+
+执行:
+
+```bash
+$ docker login # 登录, 用于推送 apache/dolphinscheduler
+$ bash ./docker/build/hooks/build x
+```
+
### 如何为 Docker 添加一个环境变量?
如果你想在编译的时候或者运行的时候附加一些其它的操作及新增一些环境变量,你可以在`/root/start-init-conf.sh`文件中进行修改,同时如果涉及到配置文件的修改,请在`/opt/dolphinscheduler/conf/*.tpl`中修改相应的配置文件