From cbb6f55729372edace997275e64e35e9b9a16e78 Mon Sep 17 00:00:00 2001 From: mohammedtabish0 <72498579+mohammedtabish0@users.noreply.github.com> Date: Fri, 2 Sep 2022 07:32:28 +0530 Subject: [PATCH] Docker Multiple Architecture Support (#132) Closes apache/skywalking#9089 --- .github/workflows/publish-docker.yaml | 4 +--- Makefile | 12 ++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index a2929f1..cd6ef0d 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -54,6 +54,4 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push docker image run: | - make docker && make docker-push - docker tag $HUB/license-eye:$VERSION $HUB/license-eye:latest - docker push $HUB/license-eye:latest + make docker-release diff --git a/Makefile b/Makefile index 92e1dca..c31c61d 100644 --- a/Makefile +++ b/Makefile @@ -72,15 +72,19 @@ build: windows linux darwin .PHONY: docker docker: - docker build . -t $(HUB)/$(PROJECT):$(VERSION) + docker build . -t $(HUB)/$(PROJECT):$(VERSION) -t $(HUB)/$(PROJECT):latest .PHONY: docker-push docker-push: - docker push $(HUB)/$(PROJECT):$(VERSION) + @{\ + docker buildx create --use --driver docker-container --name skywalking_eyes_main ;\ + docker buildx build --push --platform linux/amd64,linux/arm64 -t $(HUB)/$(PROJECT):$(VERSION) -t $(HUB)/$(PROJECT):latest . ;\ + build_exit_code=$$? ;\ + docker buildx rm skywalking_eyes_main ;\ + exit $$build_exit_code;\ + } -.PHONY: docker-release docker-release: docker docker-push - docker tag $(HUB)/$(PROJECT):$(VERSION) $(HUB)/$(PROJECT):latest && docker push $(HUB)/$(PROJECT):latest .PHONY: clean clean: