using docker buildx to build cross-platform image
Motivation
The official image repo on Dockerhub currently only support linux/amd64, which is limited especially on arm platforms.
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: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)
@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.
need to check whether the docker on the GitHub Action runner supports buildx
Overall looks good to me, could you add a workflow to check the build?
OK, should be done in a few days
@nodece I have added a workflow(.github/workflows/image.yaml) to run an action to build multi-platform images and push to docker hub.