pulsarctl icon indicating copy to clipboard operation
pulsarctl copied to clipboard

using docker buildx to build cross-platform image

Open raohuaming opened this issue 3 years ago • 5 comments

Motivation

The official image repo on Dockerhub currently only support linux/amd64, which is limited especially on arm platforms.

WeChatWorkScreenshot_5b85e4bf-ebd5-4169-97be-3052f1cdc455

Modifications

A new Dockerfile under docker dir was introduced to make it universal for cross building for different platforms.

Thd build script also updated to use buildx to build and push cross-platform images.

raohuaming avatar Aug 18 '22 06:08 raohuaming

@raohuaming:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

github-actions[bot] avatar Aug 18 '22 06:08 github-actions[bot]

@raohuaming:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

Nope, it only affects how to publish docker images.

raohuaming avatar Aug 18 '22 11:08 raohuaming

need to check whether the docker on the GitHub Action runner supports buildx

jiangpengcheng avatar Aug 19 '22 02:08 jiangpengcheng

Overall looks good to me, could you add a workflow to check the build?

OK, should be done in a few days

raohuaming avatar Aug 23 '22 12:08 raohuaming

@nodece I have added a workflow(.github/workflows/image.yaml) to run an action to build multi-platform images and push to docker hub.

image

raohuaming avatar Sep 23 '22 07:09 raohuaming