You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2022/10/17 06:34:21 UTC
[skywalking-satellite] branch main updated: Add Docker images for arm64 architecture (#119)
This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-satellite.git
The following commit(s) were added to refs/heads/main by this push:
new 2508e5a Add Docker images for arm64 architecture (#119)
2508e5a is described below
commit 2508e5af3eebe51e0f86f61b8e1cee7bece6b6be
Author: mrproliu <74...@qq.com>
AuthorDate: Mon Oct 17 14:34:16 2022 +0800
Add Docker images for arm64 architecture (#119)
---
CHANGES.md | 1 +
Makefile | 27 +++++++++++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 9697cbd..bf56e8c 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -7,6 +7,7 @@ Release Notes.
#### Features
* Support transmit the OpenTelemetry Metrics protocol.
* Upgrade to GO 1.18.
+* Add Docker images for arm64 architecture.
#### Bug Fixes
* Fix the missing return data when receive metrics in batch mode.
diff --git a/Makefile b/Makefile
index f08a58d..ea0fb6d 100644
--- a/Makefile
+++ b/Makefile
@@ -90,14 +90,6 @@ check: clean
exit 1; \
fi
-.PHONY: docker
-docker:
- docker build --build-arg VERSION=$(VERSION) -t $(HUB)/skywalking-satellite:v$(VERSION) --no-cache . -f docker/Dockerfile
-
-.PHONY: docker.push
-docker.push:
- docker push $(HUB)/skywalking-satellite:v$(VERSION)
-
.PHONY: release
release:
/bin/sh tools/release/create_bin_release.sh
@@ -107,3 +99,22 @@ release:
$(PLATFORMS):
mkdir -p $(OUT_DIR)
GOOS=$(os) GOARCH=$(ARCH) $(GO_BUILD) $(GO_BUILD_FLAGS) -ldflags "$(GO_BUILD_LDFLAGS)" -o $(OUT_DIR)/$(BINARY)-$(VERSION)-$(os)-$(ARCH) ./cmd
+
+docker: PLATFORMS =
+docker: LOAD_OR_PUSH = --load
+docker.push: PLATFORMS = --platform linux/amd64,linux/arm64
+docker.push: LOAD_OR_PUSH = --push
+
+.PHONY: docker docker.push
+docker docker.push:
+ $(DOCKER_RULE)
+
+define DOCKER_RULE
+ docker buildx create --use --driver docker-container --name skywalking_satellite > /dev/null 2>&1 || true
+ docker buildx build $(PLATFORMS) $(LOAD_OR_PUSH) \
+ --no-cache --build-arg VERSION=$(VERSION) \
+ -t $(HUB)/skywalking-satellite:v$(VERSION) \
+ -f docker/Dockerfile \
+ .
+ docker buildx rm skywalking_satellite || true
+endef