From fc2c4b3842adb82669104b7ed9e7fa87675c38a8 Mon Sep 17 00:00:00 2001 From: Yasmin Zhamborova Date: Tue, 3 Feb 2026 14:45:26 +0100 Subject: [PATCH 1/4] Add java 11 image --- Makefile | 7 ++++++- README.md | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 526943f..b307708 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,10 @@ WITHTOOLS_IMAGE_NAME=codacy/withtools VERSION?=$(shell cat .version || echo dev) OPENJ9_VERSION?=openj9-$(VERSION) +OPENJDK11_VERSION?=jre11-$(VERSION) OPENJDK17_VERSION?=jre17-$(VERSION) BASE_IMAGE_OPENJDK=adoptopenjdk/openjdk8:x86_64-ubuntu-jre8u462-b08 +BASE_IMAGE_OPENJDK11=eclipse-temurin:11-jdk-focal BASE_IMAGE_OPENJDK17=eclipse-temurin:17.0.16_8-jre-jammy BASE_IMAGE_OPENJ9=adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jre8u462-b08_openj9-0.53.0 @@ -13,12 +15,13 @@ all: docker_build ## produce the docker image docker_build: ## build the docker image docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(BASE_IMAGE_NAME):$(VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) --target base . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(VERSION) --target withtools . docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) --target withtools . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) --target withtools . - + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) --target withtools . docker_scan: ## scan docker images using Docker Scout docker scout quickview $(BASE_IMAGE_NAME):$(VERSION) || true @@ -34,10 +37,12 @@ push-docker-image: ## push the docker image to the registry (DOCKER_USER and DOC @docker login -u $(DOCKER_USER) -p $(DOCKER_PASS) &&\ docker push $(BASE_IMAGE_NAME):$(VERSION) docker push $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) + docker push $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION) docker push $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) + docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) .PHONY: push-latest-docker-image push-latest-docker-image: ## push the docker image with the "latest" tag to the registry (DOCKER_USER and DOCKER_PASS mandatory) diff --git a/README.md b/README.md index 015f111..c4b8027 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ Dockerfile describing a docker containing: - Debian Buster -- OpenJDK 8 JRE +- Available Java versions: + - OpenJDK 8 JRE (default) + - OpenJDK 8 JRE with OpenJ9 + - OpenJDK 11 JRE + - OpenJDK 17 JRE - Docker cli 17.09.* - Git cli 2.* - Unix tools: curl, wget and unzip. From f0b7c27bd5e1adbd9f87a281bae3c49eb2f2cf69 Mon Sep 17 00:00:00 2001 From: Yasmin Zhamborova Date: Tue, 3 Feb 2026 14:55:39 +0100 Subject: [PATCH 2/4] fx rebase --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b307708..1c9f72c 100644 --- a/Makefile +++ b/Makefile @@ -13,22 +13,24 @@ BASE_IMAGE_OPENJ9=adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jre8u462-b08_openj9 all: docker_build ## produce the docker image docker_build: ## build the docker image - docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(BASE_IMAGE_NAME):$(VERSION) --target base . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) --target base . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(BASE_IMAGE_NAME):$(VERSION) --target base . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) --target base . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(VERSION) --target withtools . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) --target withtools . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) --target withtools . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(VERSION) --target withtools . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) --target withtools . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) --target withtools . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) --target withtools . docker_scan: ## scan docker images using Docker Scout docker scout quickview $(BASE_IMAGE_NAME):$(VERSION) || true docker scout quickview $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) || true + docker scout quickview $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION) || true docker scout quickview $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) || true docker scout quickview $(WITHTOOLS_IMAGE_NAME):$(VERSION) || true docker scout quickview $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) || true + docker scout quickview $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) || true docker scout quickview $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) || true @@ -41,8 +43,8 @@ push-docker-image: ## push the docker image to the registry (DOCKER_USER and DOC docker push $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) - docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) + docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) .PHONY: push-latest-docker-image push-latest-docker-image: ## push the docker image with the "latest" tag to the registry (DOCKER_USER and DOCKER_PASS mandatory) From 7834e08319c25aa22d053f40f6c261c17ee9d695 Mon Sep 17 00:00:00 2001 From: zhamborova <47396369+zhamborova@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:12:50 +0100 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Makefile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1c9f72c..72e7dfd 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ OPENJ9_VERSION?=openj9-$(VERSION) OPENJDK11_VERSION?=jre11-$(VERSION) OPENJDK17_VERSION?=jre17-$(VERSION) BASE_IMAGE_OPENJDK=adoptopenjdk/openjdk8:x86_64-ubuntu-jre8u462-b08 -BASE_IMAGE_OPENJDK11=eclipse-temurin:11-jdk-focal +BASE_IMAGE_OPENJDK11=eclipse-temurin:11-jre-focal BASE_IMAGE_OPENJDK17=eclipse-temurin:17.0.16_8-jre-jammy BASE_IMAGE_OPENJ9=adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jre8u462-b08_openj9-0.53.0 diff --git a/README.md b/README.md index c4b8027..022034b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Contents Dockerfile describing a docker containing: -- Debian Buster +- Ubuntu-based images (for example, AdoptOpenJDK and Eclipse Temurin images based on Ubuntu 20.04 "focal" and 22.04 "jammy") - Available Java versions: - OpenJDK 8 JRE (default) - OpenJDK 8 JRE with OpenJ9 From 8ca9238948c64bda5159aee63009c67e99016353 Mon Sep 17 00:00:00 2001 From: Yasmin Zhamborova Date: Tue, 3 Feb 2026 17:19:59 +0100 Subject: [PATCH 4/4] realign --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 72e7dfd..1ca4ae0 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,13 @@ BASE_IMAGE_OPENJ9=adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jre8u462-b08_openj9 all: docker_build ## produce the docker image docker_build: ## build the docker image - docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(BASE_IMAGE_NAME):$(VERSION) --target base . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) --target base . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(BASE_IMAGE_NAME):$(VERSION) --target base . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION) --target base . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) --target base . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(VERSION) --target withtools . - docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) --target withtools . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(VERSION) --target withtools . + docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) --target withtools . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) --target withtools . docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) --target withtools .