Skip to content

Commit

Permalink
Docker Multiple Architecture Support (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedtabish0 authored Sep 2, 2022
1 parent 00b35e5 commit cbb6f55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cbb6f55

Please sign in to comment.