This is an automated email from the ASF dual-hosted git repository.
shuyangw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git
The following commit(s) were added to refs/heads/master by this push:
new df77046 ci: release on multiarch for apisix image on alpine (#197)
df77046 is described below
commit df77046d62172fcaeb49771eb202204e243311b8
Author: Shuyang Wu <[email protected]>
AuthorDate: Tue Jul 27 15:47:03 2021 -0400
ci: release on multiarch for apisix image on alpine (#197)
---
.github/workflows/apisix_push_docker_hub.yaml | 16 +++++++++-------
Makefile | 8 ++++++--
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/apisix_push_docker_hub.yaml
b/.github/workflows/apisix_push_docker_hub.yaml
index 1a1a0e5..aee1cf0 100644
--- a/.github/workflows/apisix_push_docker_hub.yaml
+++ b/.github/workflows/apisix_push_docker_hub.yaml
@@ -5,11 +5,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
- strategy:
- matrix:
- platform:
- - alpine
- - centos
steps:
- name: Check out the repo
@@ -18,7 +13,14 @@ jobs:
- name: Login
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login --username=${{
secrets.DOCKERHUB_USER }} --password-stdin
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+
- name: Push apisix image to Docker Hub
run: |
- make build-on-${{ matrix.platform }}
- make push-on-${{ matrix.platform }}
+ make push-multiarch-on-alpine
+ make build-on-centos
+ make push-on-centos
diff --git a/Makefile b/Makefile
index 92b75fc..209fc25 100644
--- a/Makefile
+++ b/Makefile
@@ -39,14 +39,18 @@ build-on-alpine-local:
docker build -t $(IMAGE_NAME):$(APISIX_VERSION)-alpine-local
--build-arg APISIX_PATH=${APISIX_PATH} -f ./alpine-local/Dockerfile .
### push-on-centos: Push apache/apisix:xx-centos image
+# centos not support multiarch since it reply on x86 rpm package
push-on-centos:
docker push $(IMAGE_NAME):$(APISIX_VERSION)-centos
docker build -t $(IMAGE_NAME):latest -f ./centos/Dockerfile .
docker push $(IMAGE_NAME):latest
### push-on-alpine: Push apache/apisix:xx-alpine image
-push-on-alpine:
- docker push $(IMAGE_NAME):$(APISIX_VERSION)-alpine
+push-multiarch-on-alpine:
+ docker buildx build --push \
+ -t $(IMAGE_NAME):$(APISIX_VERSION)-alpine \
+ --platform linux/amd64,linux/arm64 \
+ -f ./alpine/Dockerfile .
### build-on-alpine-cn: Build apache/apisix:xx-alpine image
(for chinese)
build-on-alpine-cn: