diff --git a/Makefile b/Makefile index 526943f..1ca4ae0 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-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 @@ -13,19 +15,22 @@ 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_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 @@ -34,9 +39,11 @@ 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):$(OPENJDK11_VERSION) docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) .PHONY: push-latest-docker-image diff --git a/README.md b/README.md index 015f111..022034b 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,12 @@ ## Contents Dockerfile describing a docker containing: -- Debian Buster -- OpenJDK 8 JRE +- 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 + - OpenJDK 11 JRE + - OpenJDK 17 JRE - Docker cli 17.09.* - Git cli 2.* - Unix tools: curl, wget and unzip.