Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Multiple Architecture Support :fixes#9089 #132

Merged
merged 5 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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