This is an automated email from the ASF dual-hosted git repository.
tokers 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 63acd13 feat: bump APISIX Dashboard to 2.10 (#254)
63acd13 is described below
commit 63acd135d35131575a318ec18d9a4236cfa72c64
Author: Zeping Bai <[email protected]>
AuthorDate: Tue Dec 21 09:48:30 2021 +0800
feat: bump APISIX Dashboard to 2.10 (#254)
---
.github/workflows/dashboard-docker-test.yaml | 2 +-
.github/workflows/dashboard_push_docker_hub.yaml | 11 ++++++++---
Makefile | 17 ++++++++++++++++-
README.md | 2 +-
dashboard/Dockerfile | 17 +++++++++++------
5 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/dashboard-docker-test.yaml
b/.github/workflows/dashboard-docker-test.yaml
index b1f4526..d409d58 100644
--- a/.github/workflows/dashboard-docker-test.yaml
+++ b/.github/workflows/dashboard-docker-test.yaml
@@ -13,7 +13,7 @@ jobs:
name: build dashboard & test
runs-on: ubuntu-latest
env:
- APISIX_DASHBOARD_TAG: 2.9.0
+ APISIX_DASHBOARD_TAG: "2.10"
steps:
- name: Checkout
uses: actions/checkout@v2
diff --git a/.github/workflows/dashboard_push_docker_hub.yaml
b/.github/workflows/dashboard_push_docker_hub.yaml
index 3cbe819..9f49a45 100644
--- a/.github/workflows/dashboard_push_docker_hub.yaml
+++ b/.github/workflows/dashboard_push_docker_hub.yaml
@@ -1,7 +1,7 @@
name: Push apisix dashboard to Docker image
on:
push:
- branches: []
+ branches: ['release/apisix-dashboard**']
jobs:
build:
runs-on: ubuntu-latest
@@ -15,8 +15,13 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
- name: Push apisix dashboard image to Docker Hub
run: |
- make build-dashboard
- make push-dashboard
+ make push-multiarch-dashbaord
diff --git a/Makefile b/Makefile
index 5f99e56..d7facc5 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ APISIX_VERSION ?= 2.11.0
IMAGE_NAME = apache/apisix
IMAGE_TAR_NAME = apache_apisix
-APISIX_DASHBOARD_VERSION ?= 2.9.0
+APISIX_DASHBOARD_VERSION ?= 2.10
APISIX_DASHBOARD_IMAGE_NAME = apache/apisix-dashboard
APISIX_DASHBOARD_IMAGE_TAR_NAME = apache_apisix_dashboard
@@ -160,6 +160,21 @@ push-dashboard:
@$(call func_echo_success_status, "$@ -> [ Done ]")
+### push-multiarch-dashbaord : Build and push multiarch apache/dashboard:tag
image
+.PHONY: push-multiarch-dashbaord
+push-multiarch-dashbaord:
+ @$(call func_echo_status, "$@ -> [ Start ]")
+ $(ENV_DOCKER) buildx build --push \
+ -t $(APISIX_DASHBOARD_IMAGE_NAME):$(APISIX_DASHBOARD_VERSION) \
+ --platform linux/amd64,linux/arm64 \
+ -f ./dashboard/Dockerfile .
+ $(ENV_DOCKER) buildx build --push \
+ -t $(APISIX_DASHBOARD_IMAGE_NAME):latest \
+ --platform linux/amd64,linux/arm64 \
+ -f ./dashboard/Dockerfile .
+ @$(call func_echo_success_status, "$@ -> [ Done ]")
+
+
### save-dashboard-tar : tar apache/apisix-dashboard:tag image
.PHONY: save-dashboard-tar
save-dashboard-tar:
diff --git a/README.md b/README.md
index b8d7bef..ca1f60c 100644
--- a/README.md
+++ b/README.md
@@ -79,7 +79,7 @@ apache/apisix:whole
* All in one Docker container for Apache apisix-dashboard
-**The latest version of `apisix-dashboard` is 2.9 and can be used with APISIX
2.10.**
+**The latest version of `apisix-dashboard` is 2.10 and can be used with APISIX
2.11.**
```sh
make build-dashboard
diff --git a/dashboard/Dockerfile b/dashboard/Dockerfile
index 0723153..cb1000f 100644
--- a/dashboard/Dockerfile
+++ b/dashboard/Dockerfile
@@ -14,9 +14,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-FROM alpine:latest as pre-build
+ARG BUILDPLATFORM=amd64
-ARG APISIX_DASHBOARD_VERSION=release/2.9.0
+FROM --platform=$BUILDPLATFORM alpine:latest as pre-build
+
+ARG APISIX_DASHBOARD_VERSION=release/2.10
RUN set -x \
&& apk add --no-cache --virtual .builddeps git \
@@ -24,7 +26,7 @@ RUN set -x \
&& cd /usr/local/apisix-dashboard && git clean -Xdf \
&& rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash
-FROM golang:1.14 as api-builder
+FROM --platform=$BUILDPLATFORM golang:1.14 as api-builder
ARG ENABLE_PROXY=false
@@ -32,11 +34,14 @@ WORKDIR /usr/local/apisix-dashboard
COPY --from=pre-build /usr/local/apisix-dashboard .
+ARG TARGETOS
+ARG TARGETARCH
+
RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w
GOPROXY=https://goproxy.io,direct ; fi \
&& go env -w GO111MODULE=on \
- && CGO_ENABLED=0 ./api/build.sh
+ && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} ./api/build.sh
-FROM node:14-alpine as fe-builder
+FROM --platform=$BUILDPLATFORM node:14-alpine as fe-builder
ARG ENABLE_PROXY=false
@@ -66,4 +71,4 @@ RUN mkdir logs
EXPOSE 9000
-CMD [ "/usr/local/apisix-dashboard/manager-api" ]
+ENTRYPOINT [ "/usr/local/apisix-dashboard/manager-api" ]