This is an automated email from the ASF dual-hosted git repository.
popduke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/bifromq.git
The following commit(s) were added to refs/heads/main by this push:
new 1883873bc Support multi arch docker image (#224)
1883873bc is described below
commit 1883873bce42bf314b4a422a10c03e27281c66b6
Author: Gu Jiawei <[email protected]>
AuthorDate: Sun Feb 1 17:22:21 2026 -0800
Support multi arch docker image (#224)
---
.github/workflows/docker-publish.yml | 24 ++++++++++++++++--------
release/docker-build.sh | 4 ++--
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/docker-publish.yml
b/.github/workflows/docker-publish.yml
index 22087b7d8..8aa642584 100644
--- a/.github/workflows/docker-publish.yml
+++ b/.github/workflows/docker-publish.yml
@@ -29,7 +29,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: "Download and verify artifact"
+ - name: "Download and Verify Artifact"
run: |
set -euo pipefail
ARTIFACT_URL="${{ inputs.artifact_url }}"
@@ -40,12 +40,20 @@ jobs:
curl -fSL "${ARTIFACT_URL}.sha512" -o /tmp/apache-bifromq-${{
inputs.version }}.tar.gz.sha512
cd /tmp
sha512sum --check "apache-bifromq-${{ inputs.version
}}.tar.gz.sha512"
- - name: "Build image"
+ - name: "Build and Push Multi-Arch Image"
run: |
set -euo pipefail
- chmod +x release/docker-build.sh
- release/docker-build.sh -t "${IMAGE_REPO}:${{ inputs.version }}"
"/tmp/apache-bifromq-${{ inputs.version }}.tar.gz"
- - name: "Push image"
- run: |
- set -euo pipefail
- docker push "${IMAGE_REPO}:${{ inputs.version }}"
\ No newline at end of file
+ ctx_dir="/tmp/bifromq-docker-build-context"
+ rm -rf "$ctx_dir"
+ mkdir -p "$ctx_dir"
+
+ cp Dockerfile "$ctx_dir/Dockerfile"
+ cp "/tmp/apache-bifromq-${{ inputs.version }}.tar.gz" "$ctx_dir/"
+ cp "/tmp/apache-bifromq-${{ inputs.version }}.tar.gz.sha512"
"$ctx_dir/"
+
+ docker buildx build \
+ --platform linux/amd64,linux/arm64 \
+ --build-arg BIFROMQ_VERSION="${{ inputs.version }}" \
+ -t "${IMAGE_REPO}:${{ inputs.version }}" \
+ --push \
+ "$ctx_dir"
diff --git a/release/docker-build.sh b/release/docker-build.sh
index e3918dd3c..b3b52d386 100755
--- a/release/docker-build.sh
+++ b/release/docker-build.sh
@@ -7,9 +7,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY