From b337ac7808e04ab39f305191613d19e12b57a4fb Mon Sep 17 00:00:00 2001 From: Adrian Cole <64215+codefromthecrypt@users.noreply.github.com> Date: Sat, 3 Aug 2024 11:22:35 +0800 Subject: [PATCH] updates to latest alpine, maven plugins and JDK 21.0.4 (#89) Signed-off-by: Adrian Cole --- .github/workflows/test.yml | 2 +- Dockerfile | 4 ++-- README.md | 20 ++++++++++---------- install.sh | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f702d96..4bbf856 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: matrix: # match with maven-enforcer-plugin rules in pom.xml include: - name: build-arg - version: 21.0.3_p9 + version: 21.0.4_p7 - name: implicit version: master steps: diff --git a/Dockerfile b/Dockerfile index 83b9ea7..59b0305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ # docker_parent_image is the base layer of full and jre image # # Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/alpine -ARG docker_parent_image=ghcr.io/openzipkin/alpine:3.20.0 +ARG docker_parent_image=ghcr.io/openzipkin/alpine:3.20.2 # java_version and java_home are hard-coded here to allow the following: # * `docker build https://github.com/openzipkin/docker-java.git` @@ -17,7 +17,7 @@ ARG docker_parent_image=ghcr.io/openzipkin/alpine:3.20.0 # When updating, also update the README # * Use current version from https://pkgs.alpinelinux.org/packages?name=openjdk21, stripping # the `-rX` at the end. -ARG java_version=21.0.3_p9 +ARG java_version=21.0.4_p7 ARG java_home=/usr/lib/jvm/java-21-openjdk # We copy files from the context into a scratch container first to avoid a problem where docker and diff --git a/README.md b/README.md index b940346..5522329 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,10 @@ This is an internal base layer primarily used in [zipkin](https://github.com/ope To try the image, run the `java -version` command: ```bash -$ docker run --rm ghcr.io/openzipkin/java:21.0.3_p9 -version -openjdk version "21.0.3" 2024-04-16 -OpenJDK Runtime Environment (build 21.0.3+9-alpine-r0) -OpenJDK 64-Bit Server VM (build 21.0.3+9-alpine-r0, mixed mode, sharing) +$ docker run --rm ghcr.io/openzipkin/java:21.0.4_p7 -version +openjdk version "21.0.4" 2024-07-16 +OpenJDK Runtime Environment (build 21.0.4+7-alpine-r0) +OpenJDK 64-Bit Server VM (build 21.0.4+7-alpine-r0, mixed mode, sharing) ``` ## Release process @@ -39,19 +39,19 @@ Build the [Dockerfile](Dockerfile) using the current version without the revision classifier from here: * https://pkgs.alpinelinux.org/packages?name=openjdk21 ```bash -# Note 21.0.3_p9 not 21.0.3_p9-r2! -./build-bin/build 21.0.3_p9 +# Note 21.0.4_p7 not 21.0.4_p7-r2! +./build-bin/build 21.0.4_p7 ``` Next, verify the built image matches that version: ```bash $ docker run --rm openzipkin/java:test -version -openjdk version "21.0.3" 2024-04-16 -OpenJDK Runtime Environment (build 21.0.3+9-alpine-r0) -OpenJDK 64-Bit Server VM (build 21.0.3+9-alpine-r0, mixed mode, sharing) +openjdk version "21.0.4" 2024-07-16 +OpenJDK Runtime Environment (build 21.0.4+7-alpine-r0) +OpenJDK 64-Bit Server VM (build 21.0.4+7-alpine-r0, mixed mode, sharing) ``` -To release the image, push a tag matching the arg to `build-bin/build` (ex `21.0.3_p9`). +To release the image, push a tag matching the arg to `build-bin/build` (ex `21.0.4_p7`). This triggers a [GitHub Actions](https://github.com/openzipkin/docker-java/actions) job to push the image. ## java.lang.ClassNotFoundException diff --git a/install.sh b/install.sh index 2b83e42..7880f63 100755 --- a/install.sh +++ b/install.sh @@ -51,5 +51,5 @@ apache_backup_mirror=https://downloads.apache.org/ (wget ${apache_mirror}${maven_dist_path} || wget ${apache_backup_mirror}${maven_dist_path}) | tar xz --strip=1 -C maven ln -s ${PWD}/maven/bin/mvn /usr/bin/mvn -mvn -q --batch-mode org.apache.maven.plugins:maven-help-plugin:3.4.0:evaluate -Dexpression=maven.version -q -DforceStdout || maybe_log_crash -mvn -q --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.6.1:get -Dmdep.skip +mvn -q --batch-mode org.apache.maven.plugins:maven-help-plugin:3.4.1:evaluate -Dexpression=maven.version -q -DforceStdout || maybe_log_crash +mvn -q --batch-mode org.apache.maven.plugins:maven-dependency-plugin:3.7.1:get -Dmdep.skip