You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/01/26 04:14:16 UTC

[skywalking-java] branch docker/arm updated (992a2a2 -> 48b68b0)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch docker/arm
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git.


 discard 992a2a2  Migrate base images to Temurin and add images for ARM
     new 48b68b0  Migrate base images to Temurin and add images for ARM

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (992a2a2)
            \
             N -- N -- N   refs/heads/docker/arm (48b68b0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.md | 1 +
 Makefile   | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

[skywalking-java] 01/01: Migrate base images to Temurin and add images for ARM

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch docker/arm
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git

commit 48b68b06e098a6a42d4ab306ef0a74dd94cfb8bc
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Wed Jan 26 12:04:16 2022 +0800

    Migrate base images to Temurin and add images for ARM
---
 .github/workflows/publish-docker.yaml |  3 ++-
 CHANGES.md                            |  1 +
 Dockerfile                            |  4 +--
 Makefile                              | 47 +++++++++++++++++------------------
 docs/en/contribution/compiling.md     |  2 +-
 5 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml
index d92d878..ca59849 100644
--- a/.github/workflows/publish-docker.yaml
+++ b/.github/workflows/publish-docker.yaml
@@ -20,6 +20,7 @@ on:
   push:
     branches:
       - main
+      - docker/arm
 
 env:
   SKIP_TEST: true
@@ -60,7 +61,7 @@ jobs:
     timeout-minutes: 60
     strategy:
       matrix:
-        java-version: [ 8, 11, 12, 13, 14, 15, 16, 17 ]
+        java-version: [ 8, 11, 17 ]
     env:
       TAG: ${{ github.sha }}
     steps:
diff --git a/CHANGES.md b/CHANGES.md
index 8133a36..bda8d71 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -22,6 +22,7 @@ Release Notes.
 * Follow protocol grammar fix `GCPhrase -> GCPhase`.
 * Support ZGC GC time and count metric collect. (Require 9.0.0 OAP)
 * Support configuration for collecting redis parameters for jedis-2.x and redisson-3.x plugin.
+* Migrate base images to Temurin and add images for ARM.
 
 #### Documentation
 
diff --git a/Dockerfile b/Dockerfile
index bbedf37..08b4274 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-ARG BASE_IMAGE='adoptopenjdk/openjdk8:alpine-jre'
+ARG BASE_IMAGE='eclipse-temurin:8-jre-focal'
 
 ARG SKYWALKING_CLI_VERSION
 
@@ -24,7 +24,7 @@ FROM $BASE_IMAGE
 
 ARG DIST=skywalking-agent
 
-RUN apk add --no-cache openssl
+RUN apk add --no-cache openssl || true
 
 LABEL maintainer="kezhenxu94@apache.org"
 
diff --git a/Makefile b/Makefile
index b3b3ffc..c7e4eb8 100644
--- a/Makefile
+++ b/Makefile
@@ -34,35 +34,34 @@ dist: build
 
 # Docker build
 
-base.adopt := java8 java11 java12 java13 java14 java15 java16
-base.temurin := java17
-
-base.all := alpine $(base.adopt) $(base.temurin)
+base.all := alpine java8 java11 java17
 base.each = $(word 1, $@)
 
 base.image.alpine := alpine:3
-base.image.java8 := adoptopenjdk/openjdk8:alpine-jre
-base.image.java11 := adoptopenjdk/openjdk11:alpine-jre
-base.image.java12 := adoptopenjdk/openjdk12:alpine-jre
-base.image.java13 := adoptopenjdk/openjdk13:alpine-jre
-base.image.java14 := adoptopenjdk/openjdk14:alpine-jre
-base.image.java15 := adoptopenjdk/openjdk15:alpine-jre
-base.image.java16 := adoptopenjdk/openjdk16:alpine-jre
-base.image.java17 := eclipse-temurin:17-alpine
+base.image.java8 := eclipse-temurin:8-jre
+base.image.java11 := eclipse-temurin:11-jre
+base.image.java17 := eclipse-temurin:17-jre
+
+docker.%: PLATFORMS =
+docker.%: LOAD_OR_PUSH = --load
+docker.push.%: PLATFORMS = --platform linux/amd64,linux/arm64
+docker.push.%: LOAD_OR_PUSH = --push
 
 .PHONY: $(base.all)
 $(base.all:%=docker.%): BASE_IMAGE=$($(base.each:docker.%=base.image.%))
-$(base.all:%=docker.%): docker.%: skywalking-agent
-	docker build --no-cache --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg DIST=$(AGENT_PACKAGE) --build-arg SKYWALKING_CLI_VERSION=$(CLI_VERSION) . -t $(HUB)/$(NAME):$(TAG)-$(base.each:docker.%=%)
+$(base.all:%=docker.%): FINAL_TAG=$(TAG)-$(base.each:docker.%=%)
+$(base.all:%=docker.push.%): BASE_IMAGE=$($(base.each:docker.push.%=base.image.%))
+$(base.all:%=docker.push.%): FINAL_TAG=$(TAG)-$(base.each:docker.push.%=%)
+$(base.all:%=docker.%) $(base.all:%=docker.push.%): skywalking-agent
+	docker buildx create --use --driver docker-container --name skywalking_main > /dev/null 2>&1 || true
+	docker buildx build $(PLATFORMS) $(LOAD_OR_PUSH) \
+        --no-cache \
+        --build-arg BASE_IMAGE=$(BASE_IMAGE) \
+        --build-arg DIST=$(AGENT_PACKAGE) \
+        --build-arg SKYWALKING_CLI_VERSION=$(CLI_VERSION) \
+        . -t $(HUB)/$(NAME):$(FINAL_TAG)
+	docker buildx rm skywalking_main || true
 
-.PHONY: docker
+.PHONY: docker docker.push
 docker: $(base.all:%=docker.%)
-
-# Docker push
-
-.PHONY: $(base.all:%=docker.push.%)
-$(base.all:%=docker.push.%): docker.push.%: docker.%
-	docker push $(HUB)/$(NAME):$(TAG)-$(base.each:docker.push.%=%)
-
-.PHONY: docker.push
-docker.push: $(base.all:%=docker.%)
+docker.push: $(base.all:%=docker.push.%)
diff --git a/docs/en/contribution/compiling.md b/docs/en/contribution/compiling.md
index a166789..94d8d79 100644
--- a/docs/en/contribution/compiling.md
+++ b/docs/en/contribution/compiling.md
@@ -24,7 +24,7 @@ folders if you are using IntelliJ IDE.
 # Building Docker images
 
 After you have [compiled the project](#compiling-project) and have generated the `skywalking-agent` folder, you can
-build Docker images. [`make docker`] builds the agent Docker images based on `alpine` image and `java8 ~ java 17`
+build Docker images. [`make docker`] builds the agent Docker images based on `alpine` image, `java8`, `java11` and `java 17`
 images by default. If you want to only build part of the images, add suffix `.alpine` or `.java<x>` to the `make`
 target, for example: