From fe75f2b0a31a252a02236fb252906a2cf9450f73 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Wed, 27 Jul 2022 15:23:39 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[Description:]=20=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84=E5=B9=B3=E5=8F=B0=E5=88=97=E8=A1=A8=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E5=92=8C=E4=BB=A3=E7=A0=81=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-a111081a41f9964ded12a89efccec51ab1d4dd88 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 1a87f81..cd451a2 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,11 @@ 'linux/ppc64le', 'linux/s390x', 'linux/386', + 'linux/arm/v5', 'linux/arm/v7', 'linux/arm/v6', 'linux/arm64/v8', + 'linux/mips64le', 'windows/amd64', 'windows/arm64', 'darwin/amd64', -- Gitee From 919e4f5e3886960bf10c4ce9a201332b6fa10ef1 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Wed, 27 Jul 2022 16:16:53 +0800 Subject: [PATCH 2/8] =?UTF-8?q?[Description:]=20=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E8=AF=B4=E6=98=8E=E6=A0=BC=E5=BC=8F=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-5d9d695d310f728d5001df60ea2300ed3eca7765 --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cd451a2..0315f74 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,13 @@ ![avatar](./images/20220509-165318.jpg) ## **参数说明:** -image_tag:需要打包的docker镜像标签,必填,如 swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 -platforms: 当前需要打包支持的平台,用逗号隔开,如 linux/amd64,linux/arm64/v8,windows/amd64,非必填,如果不填写的话,会默认打包当前环境所在的平台,如ubuntu-latest所在的linux/amd64 -file: Dockerfile路径,默认为Dockerfile,如果在其他目录,则填写相对路径或者绝对路径,如 ./dockerfiles/Dockerfile -use_latest_buildx: 是否需要使用最新版本的docker buildx来构建docker镜像,如果为true,会比较当前安装的buildx和官方发布的最新版本,有差异的话会安装最新版本 -push: 是否需要将构建好的镜像推送到docker镜像仓库,如果填true,需要再前面增加一个docker login的 action完成镜像仓库的登录,在构建完成之后会自动推送到华为云SWR +| Name | Require | Default | Description | +| ------------ | ------- | ------- | ----------- | +| image_tag | true | | 需要打包的docker镜像标签,如:swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4| +| platforms | false | | 当前需要打包支持的平台,用逗号隔开。如 linux/amd64,linux/arm64/v8,windows/amd64。如果不填写的话,会默认打包当前环境所在的平台,如ubuntu-latest所在的linux/amd64| +| file | false | | Dockerfile路径,默认为Dockerfile,如果在其他目录,则填写相对路径或者绝对路径,如 ./dockerfiles/Dockerfile| +| use_latest_buildx | false | false | 是否需要使用最新版本的docker buildx来构建docker镜像,如果为true,会比较当前安装的buildx和官方发布的最新版本,有差异的话会安装最新版本| +| push | true | false | 是否需要将构建好的镜像推送到docker镜像仓库,如果填true,需要再前面增加一个docker login的 action完成镜像仓库的登录,在构建完成之后会自动推送到华为云SWR| ## **使用样例** ### 1、简单样例,只构建代码和打包镜像 -- Gitee From 2d442466a284489a1529e3ec82578984bb50e6f7 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Wed, 27 Jul 2022 16:24:51 +0800 Subject: [PATCH 3/8] =?UTF-8?q?[Description:]=20=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=BC=96=E5=8F=B7=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-b4ae3b7d78af3fe94ee3ae6e59b9f8e008f27d56 --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 0315f74..fc9026e 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ ``` ## **前置工作** -(1).如果项目代码需要打包,需要提前完成打包动作,并修改Dockerfile -(2).如果需要推送到SWR等Docker registry上,需要添加一个docker login的action,添加好登录账号密码等信息 -(3).需要确定基础镜像支持的平台,可以登录dockerhub官网查看 +(1) 如果项目代码需要打包,需要提前完成打包动作,并修改Dockerfile +(2) 如果需要推送到SWR等Docker registry上,需要添加一个docker login的action,添加好登录账号密码等信息 +(3) 需要确定基础镜像支持的平台,可以登录dockerhub官网查看 如19-jdk,支持windows/amd64,linux/amd64,linux/arm64/v8 这三个平台, ![avatar](./images/20220509-165318.jpg) @@ -37,8 +37,8 @@ ## **使用样例** ### 1、简单样例,只构建代码和打包镜像 步骤说明如下 -(1)、完成jdk安装和java项目打包 -(2)、填写image_tag参数,镜像会工具当前环境所在的平台,打包出一个 linux/amd64的镜像 +(1) 完成jdk安装和java项目打包 +(2) 填写image_tag参数,镜像会工具当前环境所在的平台,打包出一个 linux/amd64的镜像 ```yaml # 安装JDK和maven - name: Set up JDK 19 for maven build @@ -60,10 +60,10 @@ ### 2、普通样例,完成镜像的windows和linux平台构建,并上传到swr 步骤说明如下 -(1)、完成jdk安装和java项目打包 -(2)、设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 -(3)、设置docker buildx,可以选配,插件会检查当前环境是否安装了docker buildx,如果没有的话,会自动安装 -(4)、登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/amd64,linux/arm64/v8,windows/amd64三个平台,因此platforms参数可以填写这三个中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR +(1) 完成jdk安装和java项目打包 +(2) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 +(3) 设置docker buildx,可以选配,插件会检查当前环境是否安装了docker buildx,如果没有的话,会自动安装 +(4) 登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/amd64,linux/arm64/v8,windows/amd64三个平台,因此platforms参数可以填写这三个中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR ![avatar](./images/20220509-165318.jpg) ```yaml # 安装JDK和maven @@ -101,9 +101,9 @@ 详情可参考 ./github/workflow/build-springclouddemo-for-multiplatform.yml ### 3、复杂样例,完成镜像的复杂多平台构建,并上传到swr 步骤说明如下 -(1)、设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 -(2)、登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x 平台,因此platforms参数可以填写些平台中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR -(3)、file参数指定Dockerfile的路径,此处为./dockerfiles/Dockerfile-nginx +(1) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 +(2) 登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x 平台,因此platforms参数可以填写些平台中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR +(3) file参数指定Dockerfile的路径,此处为./dockerfiles/Dockerfile-nginx ![avatar](./images/nginx-multiplatform.png) ```yaml # docker login,设置登陆到华为的swr @@ -159,11 +159,11 @@ manifests: ### **镜像使用:** 在linunx或者windows的x86-64平台或者linux的arm-64平台,直接docker pull这个镜像,docker会自动下载对应平台的镜像 -#### (1)、linux x86-64平台 +#### (1) linux x86-64平台 ![avatar](./images/20220510-094740.png) -#### (2)、linux arm-64平台: +#### (2) linux arm-64平台: ![avatar](./images/20220509-195911.png) -#### (3)、windows x86-64平台 +#### (3) windows x86-64平台 ![avatar](./images/20220510-085854.png) ### 2、nginx:nginx-12-v1.0.0.1镜像 -- Gitee From 5d403586d8ab7cb21813800b56f2cb28371fdab4 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Wed, 27 Jul 2022 17:11:54 +0800 Subject: [PATCH 4/8] =?UTF-8?q?[Description:]=20=20sample=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-c722e37b20cc64e91bbb94845650a1f9d042763c --- .github/workflows/build-local-for-test.yml | 10 ++-- .../build-nginx-for-multiplatform.yml | 14 ++--- ...uild-springclouddemo-for-multiplatform.yml | 20 +++---- Dockerfile | 2 +- README.md | 52 +++++++++---------- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build-local-for-test.yml b/.github/workflows/build-local-for-test.yml index 67ef1c9..f3484b6 100644 --- a/.github/workflows/build-local-for-test.yml +++ b/.github/workflows/build-local-for-test.yml @@ -12,16 +12,16 @@ jobs: - name: Check Out uses: actions/checkout@v2 - - name: Set up JDK 19 for maven build + - name: Set up JDK 8 for maven build uses: actions/setup-java@v1 with: - java-version: 19 + java-version: 8 # 完成java项目打包 - - name: build maven project + - name: Build Maven Project run: mvn clean -U package -Dmaven.test.skip - - name: "build springcloud demo for linux/amd64" - uses: huaweicloud/swr-multiplatform-build-action@v1.0.0 + - name: Build SpringCloud Demo for linux/amd64 + uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 \ No newline at end of file diff --git a/.github/workflows/build-nginx-for-multiplatform.yml b/.github/workflows/build-nginx-for-multiplatform.yml index 33c7b54..584383a 100644 --- a/.github/workflows/build-nginx-for-multiplatform.yml +++ b/.github/workflows/build-nginx-for-multiplatform.yml @@ -13,15 +13,15 @@ jobs: uses: actions/checkout@v2 # docker login,设置登陆到华为的swr - - name: Log in to HuaweiCloud SWR - uses: huaweicloud/swr-login@v1 + - name: Log in to Huawei Cloud SWR + uses: huaweicloud/swr-login@v2.0.0 with: - region: cn-north-4 - access-key-id: ${{ secrets.ACCESSKEY }} - access-key-secret: ${{ secrets.SECRETACCESSKEY }} + region: cn-north-4 + access-key-id: ${{ secrets.ACCESSKEY }} + access-key-secret: ${{ secrets.SECRETACCESSKEY }} - - name: "build nginx image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x" - uses: huaweicloud/swr-multiplatform-build-action@v1.0.0 + - name: Build Nginx Image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/nginx:nginx-12-v1.0.0.1 platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x diff --git a/.github/workflows/build-springclouddemo-for-multiplatform.yml b/.github/workflows/build-springclouddemo-for-multiplatform.yml index 4d5f553..d18d8ab 100644 --- a/.github/workflows/build-springclouddemo-for-multiplatform.yml +++ b/.github/workflows/build-springclouddemo-for-multiplatform.yml @@ -13,29 +13,29 @@ jobs: - name: Check Out uses: actions/checkout@v2 - - name: Set up JDK 19 for maven build + - name: Set up JDK 8 for maven build uses: actions/setup-java@v1 with: - java-version: 19 + java-version: 8 # 完成java项目打包 - - name: build maven project + - name: Build Maven Project run: mvn clean -U package -Dmaven.test.skip # docker login,设置登陆到华为的swr - - name: Log in to HuaweiCloud SWR - uses: huaweicloud/swr-login@v1 + - name: Log in to Huawei Cloud SWR + uses: huaweicloud/swr-login@v2.0.0 with: - region: cn-north-4 - access-key-id: ${{ secrets.ACCESSKEY }} - access-key-secret: ${{ secrets.SECRETACCESSKEY }} + region: cn-north-4 + access-key-id: ${{ secrets.ACCESSKEY }} + access-key-secret: ${{ secrets.SECRETACCESSKEY }} # 设置 docker 环境 - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v1 - - name: "build springcloud demo for linux/amd64,linux/arm64/v8,windows/amd64" - uses: huaweicloud/swr-multiplatform-build-action@v1.0.0 + - name: Build SpringCloud Demo for linux/amd64,linux/arm64/v8,windows/amd64" + uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 platforms: linux/amd64,linux/arm64/v8,windows/amd64 diff --git a/Dockerfile b/Dockerfile index f142719..9edf8cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM swr.cn-north-6.myhuaweicloud.com/codeci/maven:openjdk-19 +FROM openjdk:19-jdk ADD ./target/demoapp.jar /usr/local/ CMD [ "java", "-jar", "/usr/local/demoapp.jar" ] \ No newline at end of file diff --git a/README.md b/README.md index fc9026e..cc481cd 100644 --- a/README.md +++ b/README.md @@ -41,22 +41,22 @@ (2) 填写image_tag参数,镜像会工具当前环境所在的平台,打包出一个 linux/amd64的镜像 ```yaml # 安装JDK和maven - - name: Set up JDK 19 for maven build + - name: Set up JDK 8 for Maven Build uses: actions/setup-java@v1 with: - java-version: 19 + java-version: 8 # 完成java项目打包 - - name: build maven project + - name: Build Maven Project run: mvn clean -U package -Dmaven.test.skip # 完成docker镜像打包 - - name: "build springcloud demo for linux/amd64" - uses: huaweicloud/swr-multiplatform-build-action@v1.0.0 + - name: Build SpringCloud Demo for linux/amd64 + uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 ``` -详情可参考 ./github/workflow/build-local-for-test.yml +详情可参考 [./github/workflows/build-local-for-test.yml](.github/workflows/build-local-for-test.yml) ### 2、普通样例,完成镜像的windows和linux平台构建,并上传到swr 步骤说明如下 @@ -67,30 +67,30 @@ ![avatar](./images/20220509-165318.jpg) ```yaml # 安装JDK和maven - - name: Set up JDK 19 for maven build + - name: Set up JDK 8 for Maven Build uses: actions/setup-java@v1 with: - java-version: 19 + java-version: 8 # 完成java项目打包 - - name: build maven project + - name: Build Maven Project run: mvn clean -U package -Dmaven.test.skip # docker login,设置登陆到华为的swr - - name: Log in to HuaweiCloud SWR - uses: huaweicloud/swr-login@v1 + - name: Log in to Huawei Cloud SWR + uses: huaweicloud/swr-login@v2.0.0 with: - region: cn-north-4 - access-key-id: ${{ secrets.ACCESSKEY }} - access-key-secret: ${{ secrets.SECRETACCESSKEY }} + region: cn-north-4 + access-key-id: ${{ secrets.ACCESSKEY }} + access-key-secret: ${{ secrets.SECRETACCESSKEY }} # 设置 docker 环境 - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v1 # 完成docker镜像打包,支持linux/amd64,linux/arm64/v8,windows/amd64三个平台 - - name: "build springcloud demo for linux/amd64,linux/arm64/v8,windows/amd64" - uses: huaweicloud/swr-multiplatform-build-action@v1.0.0 + - name: Build SpringCloud Demo for linux/amd64,linux/arm64/v8,windows/amd64 + uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 platforms: linux/amd64,linux/arm64/v8,windows/amd64 @@ -98,7 +98,8 @@ push: true file: ./Dockerfile ``` -详情可参考 ./github/workflow/build-springclouddemo-for-multiplatform.yml +详情可参考 [.github/workflows/build-springclouddemo-for-multiplatform.yml](.github/workflows/build-springclouddemo-for-multiplatform.yml) + ### 3、复杂样例,完成镜像的复杂多平台构建,并上传到swr 步骤说明如下 (1) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 @@ -107,16 +108,16 @@ ![avatar](./images/nginx-multiplatform.png) ```yaml # docker login,设置登陆到华为的swr - - name: Log in to HuaweiCloud SWR - uses: huaweicloud/swr-login@v1 + - name: Log in to Huawei Cloud SWR + uses: huaweicloud/swr-login@v2.0.0 with: - region: cn-north-4 - access-key-id: ${{ secrets.ACCESSKEY }} - access-key-secret: ${{ secrets.SECRETACCESSKEY }} + region: cn-north-4 + access-key-id: ${{ secrets.ACCESSKEY }} + access-key-secret: ${{ secrets.SECRETACCESSKEY }} # 完成docker镜像打包,支持多个平台 - - name: "build nginx image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x" - uses: huaweicloud/swr-multiplatform-build-action@v1.0.0 + - name: Build Nginx Image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/nginx:nginx-12-v1.0.0.1 platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x @@ -124,8 +125,7 @@ push: true file: ./dockerfiles/Dockerfile-nginx ``` - 详情可参考 ./github/workflow/build-nginx-for-multiplatform.yml - + 详情可参考 [.github/workflows/build-nginx-for-multiplatform.yml](.github/workflows/build-nginx-for-multiplatform.yml) ## **打包查看结果** ### 1、jdkdemo:jdk19-v1.0.0.4镜像 登录华为云SWR服务,查看hcloudcli/jdkdemo:jdk19-v1.0.0.4镜像的manifast内容 -- Gitee From 107a65b71a5198da0fb7a3ec551b12343d3b5b16 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Wed, 27 Jul 2022 17:50:37 +0800 Subject: [PATCH 5/8] =?UTF-8?q?[Description:]=20=20sample=20=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-506b99d61f6203ef25d4ec2df785c9b2be15dd15 --- .../workflows/build-nginx-for-multiplatform.yml | 6 +++--- ...-local-for-test.yml => build-simple-demo.yml} | 10 +++++----- .../build-springclouddemo-for-multiplatform.yml | 10 +++++----- README.md | 16 ++++++++-------- 4 files changed, 21 insertions(+), 21 deletions(-) rename .github/workflows/{build-local-for-test.yml => build-simple-demo.yml} (72%) diff --git a/.github/workflows/build-nginx-for-multiplatform.yml b/.github/workflows/build-nginx-for-multiplatform.yml index 584383a..75fa519 100644 --- a/.github/workflows/build-nginx-for-multiplatform.yml +++ b/.github/workflows/build-nginx-for-multiplatform.yml @@ -1,4 +1,4 @@ -name: "commit-master" +name: Build Nginx for multiplatform on: push: @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check Out + - name: Checkout uses: actions/checkout@v2 # docker login,设置登陆到华为的swr @@ -20,7 +20,7 @@ jobs: access-key-id: ${{ secrets.ACCESSKEY }} access-key-secret: ${{ secrets.SECRETACCESSKEY }} - - name: Build Nginx Image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + - name: Build Nginx image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/nginx:nginx-12-v1.0.0.1 diff --git a/.github/workflows/build-local-for-test.yml b/.github/workflows/build-simple-demo.yml similarity index 72% rename from .github/workflows/build-local-for-test.yml rename to .github/workflows/build-simple-demo.yml index f3484b6..b7c0823 100644 --- a/.github/workflows/build-local-for-test.yml +++ b/.github/workflows/build-simple-demo.yml @@ -1,4 +1,4 @@ -name: "commit-master" +name: Build simple demo on: push: @@ -9,19 +9,19 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check Out + - name: Checkout uses: actions/checkout@v2 - - name: Set up JDK 8 for maven build + - name: Set up JDK 8 for Maven build uses: actions/setup-java@v1 with: java-version: 8 # 完成java项目打包 - - name: Build Maven Project + - name: Build Maven project run: mvn clean -U package -Dmaven.test.skip - - name: Build SpringCloud Demo for linux/amd64 + - name: Build Spring Cloud demo for linux/amd64 uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 \ No newline at end of file diff --git a/.github/workflows/build-springclouddemo-for-multiplatform.yml b/.github/workflows/build-springclouddemo-for-multiplatform.yml index d18d8ab..e65c6eb 100644 --- a/.github/workflows/build-springclouddemo-for-multiplatform.yml +++ b/.github/workflows/build-springclouddemo-for-multiplatform.yml @@ -1,4 +1,4 @@ -name: "commit-master" +name: Build Spring Cloud demo for multiplatform on: push: @@ -10,16 +10,16 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check Out + - name: Checkout uses: actions/checkout@v2 - - name: Set up JDK 8 for maven build + - name: Set up JDK 8 for Maven build uses: actions/setup-java@v1 with: java-version: 8 # 完成java项目打包 - - name: Build Maven Project + - name: Build Maven project run: mvn clean -U package -Dmaven.test.skip # docker login,设置登陆到华为的swr @@ -34,7 +34,7 @@ jobs: id: buildx uses: docker/setup-buildx-action@v1 - - name: Build SpringCloud Demo for linux/amd64,linux/arm64/v8,windows/amd64" + - name: Build Spring Cloud demo for linux/amd64,linux/arm64/v8,windows/amd64 uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 diff --git a/README.md b/README.md index cc481cd..a3bcd14 100644 --- a/README.md +++ b/README.md @@ -41,22 +41,22 @@ (2) 填写image_tag参数,镜像会工具当前环境所在的平台,打包出一个 linux/amd64的镜像 ```yaml # 安装JDK和maven - - name: Set up JDK 8 for Maven Build + - name: Set up JDK 8 for Maven build uses: actions/setup-java@v1 with: java-version: 8 # 完成java项目打包 - - name: Build Maven Project + - name: Build Maven project run: mvn clean -U package -Dmaven.test.skip # 完成docker镜像打包 - - name: Build SpringCloud Demo for linux/amd64 + - name: Build Spring Cloud demo for linux/amd64 uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 ``` -详情可参考 [./github/workflows/build-local-for-test.yml](.github/workflows/build-local-for-test.yml) +详情可参考 [./github/workflows/build-simple-demo.yml](.github/workflows/build-simple-demo.yml) ### 2、普通样例,完成镜像的windows和linux平台构建,并上传到swr 步骤说明如下 @@ -67,13 +67,13 @@ ![avatar](./images/20220509-165318.jpg) ```yaml # 安装JDK和maven - - name: Set up JDK 8 for Maven Build + - name: Set up JDK 8 for Maven build uses: actions/setup-java@v1 with: java-version: 8 # 完成java项目打包 - - name: Build Maven Project + - name: Build Maven project run: mvn clean -U package -Dmaven.test.skip # docker login,设置登陆到华为的swr @@ -89,7 +89,7 @@ uses: docker/setup-buildx-action@v1 # 完成docker镜像打包,支持linux/amd64,linux/arm64/v8,windows/amd64三个平台 - - name: Build SpringCloud Demo for linux/amd64,linux/arm64/v8,windows/amd64 + - name: Build Spring Cloud demo for linux/amd64,linux/arm64/v8,windows/amd64 uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4 @@ -116,7 +116,7 @@ access-key-secret: ${{ secrets.SECRETACCESSKEY }} # 完成docker镜像打包,支持多个平台 - - name: Build Nginx Image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + - name: Build Nginx image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: image_tag: swr.cn-north-4.myhuaweicloud.com/hcloudcli/nginx:nginx-12-v1.0.0.1 -- Gitee From 51da10bc489007c8f5feb04e29805d39510feb26 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Thu, 28 Jul 2022 09:51:20 +0800 Subject: [PATCH 6/8] =?UTF-8?q?[Description:]=20=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-b9dc78de64138ad2ef6c0d11904f46f041422234 --- .cid/DTSE-HDN-swr-multiplatform-build-workflow-samples.yml | 1 + .cid/cid.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.cid/DTSE-HDN-swr-multiplatform-build-workflow-samples.yml b/.cid/DTSE-HDN-swr-multiplatform-build-workflow-samples.yml index 1cd25c8..90d7259 100644 --- a/.cid/DTSE-HDN-swr-multiplatform-build-workflow-samples.yml +++ b/.cid/DTSE-HDN-swr-multiplatform-build-workflow-samples.yml @@ -17,6 +17,7 @@ machine: # 构建脚本 scripts: + - sed -i "s#openjdk:19-jdk#swr.cn-north-6.myhuaweicloud.com/codeci/maven:openjdk-19#" Dockerfile - mvn package -Dmaven.test.skip=true - docker build -t registry-cbu.huawei.com/dtse-hdn/swr-multiplatform-build-workflow-samples:${CID_SHORT_UID} . diff --git a/.cid/cid.yml b/.cid/cid.yml index d4e2a04..e306d27 100644 --- a/.cid/cid.yml +++ b/.cid/cid.yml @@ -14,6 +14,7 @@ machine: euler: - default scripts: + - sed -i "s#openjdk:19-jdk#swr.cn-north-6.myhuaweicloud.com/codeci/maven:openjdk-19#" Dockerfile - mvn package -Dmaven.test.skip=true - >- docker build -t -- Gitee From aec09911ba267a7bd3af3ac72719a348c138813b Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Thu, 28 Jul 2022 11:49:20 +0800 Subject: [PATCH 7/8] [Description:] add license Match-id-51e8a41c6f9b1ac59bb98c4a8f4ddf7d684c9f65 --- LICENSE | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 175 insertions(+), 21 deletions(-) diff --git a/LICENSE b/LICENSE index c281b50..19dc35b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,175 @@ -MIT License - -Copyright (c) 2022 米饭程序park - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. \ No newline at end of file -- Gitee From eb88da214a2a30138c47d9444cbb1d0013d07771 Mon Sep 17 00:00:00 2001 From: Chenyt26 <2396164919@qq.com> Date: Fri, 29 Jul 2022 14:43:18 +0800 Subject: [PATCH 8/8] =?UTF-8?q?[Description:]=20=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Match-id-1002e8e699f475dacc8f414b3d337986fb7e99be --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index a3bcd14..c207c82 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # swr-multiplatform-build-action -允许用户构建跨平台镜像,如linux平台,windows平台或macos平台,并可以直接推送到SWR等Docker镜像仓库上 +允许用户构建跨平台镜像,如linux平台,windows平台或macos平台,并可以直接推送到SWR等Docker镜像仓库上 目前支持的平台列表如下 ```yaml 'linux/amd64', @@ -19,26 +19,26 @@ ``` ## **前置工作** -(1) 如果项目代码需要打包,需要提前完成打包动作,并修改Dockerfile -(2) 如果需要推送到SWR等Docker registry上,需要添加一个docker login的action,添加好登录账号密码等信息 -(3) 需要确定基础镜像支持的平台,可以登录dockerhub官网查看 +(1) 如果项目代码需要打包,需要提前完成打包动作,并修改Dockerfile +(2) 如果需要推送到SWR等Docker registry上,需要添加一个docker login的action,添加好登录账号密码等信息 +(3) 需要确定基础镜像支持的平台,可以登录dockerhub官网查看 如19-jdk,支持windows/amd64,linux/amd64,linux/arm64/v8 这三个平台, ![avatar](./images/20220509-165318.jpg) ## **参数说明:** | Name | Require | Default | Description | | ------------ | ------- | ------- | ----------- | -| image_tag | true | | 需要打包的docker镜像标签,如:swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4| -| platforms | false | | 当前需要打包支持的平台,用逗号隔开。如 linux/amd64,linux/arm64/v8,windows/amd64。如果不填写的话,会默认打包当前环境所在的平台,如ubuntu-latest所在的linux/amd64| -| file | false | | Dockerfile路径,默认为Dockerfile,如果在其他目录,则填写相对路径或者绝对路径,如 ./dockerfiles/Dockerfile| -| use_latest_buildx | false | false | 是否需要使用最新版本的docker buildx来构建docker镜像,如果为true,会比较当前安装的buildx和官方发布的最新版本,有差异的话会安装最新版本| -| push | true | false | 是否需要将构建好的镜像推送到docker镜像仓库,如果填true,需要再前面增加一个docker login的 action完成镜像仓库的登录,在构建完成之后会自动推送到华为云SWR| +| image_tag | true | | 需要打包的docker镜像标签,如:swr.cn-north-4.myhuaweicloud.com/hcloudcli/jdkdemo:jdk19-v1.0.0.4| +| platforms | false | | 当前需要打包支持的平台,用逗号隔开。如 linux/amd64,linux/arm64/v8,windows/amd64。如果不填写的话,会默认打包当前环境所在的平台,如ubuntu-latest所在的linux/amd64| +| file | false | | Dockerfile路径,默认为Dockerfile,如果在其他目录,则填写相对路径或者绝对路径,如 ./dockerfiles/Dockerfile| +| use_latest_buildx | false | false | 是否需要使用最新版本的docker buildx来构建docker镜像,如果为true,会比较当前安装的buildx和官方发布的最新版本,有差异的话会安装最新版本| +| push | true | false | 是否需要将构建好的镜像推送到docker镜像仓库,如果填true,需要再前面增加一个docker login的 action完成镜像仓库的登录,在构建完成之后会自动推送到华为云SWR| ## **使用样例** -### 1、简单样例,只构建代码和打包镜像 +### 1、简单样例,只构建代码和打包镜像 步骤说明如下 (1) 完成jdk安装和java项目打包 -(2) 填写image_tag参数,镜像会工具当前环境所在的平台,打包出一个 linux/amd64的镜像 +(2) 填写image_tag参数,镜像会工具当前环境所在的平台,打包出一个 linux/amd64的镜像 ```yaml # 安装JDK和maven - name: Set up JDK 8 for Maven build @@ -58,12 +58,12 @@ ``` 详情可参考 [./github/workflows/build-simple-demo.yml](.github/workflows/build-simple-demo.yml) -### 2、普通样例,完成镜像的windows和linux平台构建,并上传到swr +### 2、普通样例,完成镜像的windows和linux平台构建,并上传到swr 步骤说明如下 (1) 完成jdk安装和java项目打包 -(2) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 -(3) 设置docker buildx,可以选配,插件会检查当前环境是否安装了docker buildx,如果没有的话,会自动安装 -(4) 登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/amd64,linux/arm64/v8,windows/amd64三个平台,因此platforms参数可以填写这三个中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR +(2) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 +(3) 设置docker buildx,可以选配,插件会检查当前环境是否安装了docker buildx,如果没有的话,会自动安装 +(4) 登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/amd64,linux/arm64/v8,windows/amd64三个平台,因此platforms参数可以填写这三个中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR ![avatar](./images/20220509-165318.jpg) ```yaml # 安装JDK和maven @@ -88,7 +88,7 @@ id: buildx uses: docker/setup-buildx-action@v1 - # 完成docker镜像打包,支持linux/amd64,linux/arm64/v8,windows/amd64三个平台 + # 完成docker镜像打包,支持linux/amd64,linux/arm64/v8,windows/amd64三个平台 - name: Build Spring Cloud demo for linux/amd64,linux/arm64/v8,windows/amd64 uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: @@ -100,10 +100,10 @@ ``` 详情可参考 [.github/workflows/build-springclouddemo-for-multiplatform.yml](.github/workflows/build-springclouddemo-for-multiplatform.yml) -### 3、复杂样例,完成镜像的复杂多平台构建,并上传到swr +### 3、复杂样例,完成镜像的复杂多平台构建,并上传到swr 步骤说明如下 -(1) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 -(2) 登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x 平台,因此platforms参数可以填写些平台中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR +(1) 设置docker login,填写AK和SK,完成华为云SWR容器镜像服务的登录 +(2) 登录doocker hub,查看openjdk镜像,可以看到openjdk:19-jdk 支持 linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x 平台,因此platforms参数可以填写些平台中的一个或多个,也可以填写全部。push参数填写为true,即打包完之后就push到华为云SWR (3) file参数指定Dockerfile的路径,此处为./dockerfiles/Dockerfile-nginx ![avatar](./images/nginx-multiplatform.png) ```yaml @@ -115,7 +115,7 @@ access-key-id: ${{ secrets.ACCESSKEY }} access-key-secret: ${{ secrets.SECRETACCESSKEY }} - # 完成docker镜像打包,支持多个平台 + # 完成docker镜像打包,支持多个平台 - name: Build Nginx image for linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x uses: huaweicloud/swr-multiplatform-build-action@v1.1.0 with: @@ -128,7 +128,7 @@ 详情可参考 [.github/workflows/build-nginx-for-multiplatform.yml](.github/workflows/build-nginx-for-multiplatform.yml) ## **打包查看结果** ### 1、jdkdemo:jdk19-v1.0.0.4镜像 -登录华为云SWR服务,查看hcloudcli/jdkdemo:jdk19-v1.0.0.4镜像的manifast内容 +登录华为云SWR服务,查看hcloudcli/jdkdemo:jdk19-v1.0.0.4镜像的manifast内容 ```yaml digest: sha256:e4090ef801d8240bf6dc0ff878a39cad98eaf1e811cf8a4307171588065d291c manifest详情: @@ -158,7 +158,7 @@ manifests: ![avatar](./images/20220509-194824.png) ### **镜像使用:** - 在linunx或者windows的x86-64平台或者linux的arm-64平台,直接docker pull这个镜像,docker会自动下载对应平台的镜像 + 在linunx或者windows的x86-64平台或者linux的arm-64平台,直接docker pull这个镜像,docker会自动下载对应平台的镜像 #### (1) linux x86-64平台 ![avatar](./images/20220510-094740.png) #### (2) linux arm-64平台: @@ -167,7 +167,7 @@ manifests: ![avatar](./images/20220510-085854.png) ### 2、nginx:nginx-12-v1.0.0.1镜像 - 登录华为云SWR服务,查看hcloudcli/nginx:nginx-12-v1.0.0.1镜像的manifast内容 + 登录华为云SWR服务,查看hcloudcli/nginx:nginx-12-v1.0.0.1镜像的manifast内容 ```yaml manifest详情: mediaType: application/vnd.docker.distribution.manifest.list.v2+json -- Gitee