Skip to content

Commit fc2c4b3

Browse files
committed
Add java 11 image
1 parent 74360d0 commit fc2c4b3

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ WITHTOOLS_IMAGE_NAME=codacy/withtools
33

44
VERSION?=$(shell cat .version || echo dev)
55
OPENJ9_VERSION?=openj9-$(VERSION)
6+
OPENJDK11_VERSION?=jre11-$(VERSION)
67
OPENJDK17_VERSION?=jre17-$(VERSION)
78
BASE_IMAGE_OPENJDK=adoptopenjdk/openjdk8:x86_64-ubuntu-jre8u462-b08
9+
BASE_IMAGE_OPENJDK11=eclipse-temurin:11-jdk-focal
810
BASE_IMAGE_OPENJDK17=eclipse-temurin:17.0.16_8-jre-jammy
911
BASE_IMAGE_OPENJ9=adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jre8u462-b08_openj9-0.53.0
1012

@@ -13,12 +15,13 @@ all: docker_build ## produce the docker image
1315
docker_build: ## build the docker image
1416
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(BASE_IMAGE_NAME):$(VERSION) --target base .
1517
docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJ9_VERSION) --target base .
18+
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION) --target base .
1619
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION) --target base .
1720

1821
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(VERSION) --target withtools .
1922
docker build --build-arg base_image=$(BASE_IMAGE_OPENJ9) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION) --target withtools .
2023
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK17) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION) --target withtools .
21-
24+
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) --target withtools .
2225

2326
docker_scan: ## scan docker images using Docker Scout
2427
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
3437
@docker login -u $(DOCKER_USER) -p $(DOCKER_PASS) &&\
3538
docker push $(BASE_IMAGE_NAME):$(VERSION)
3639
docker push $(BASE_IMAGE_NAME):$(OPENJ9_VERSION)
40+
docker push $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION)
3741
docker push $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION)
3842
docker push $(WITHTOOLS_IMAGE_NAME):$(VERSION)
3943
docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION)
4044
docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK17_VERSION)
45+
docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION)
4146

4247
.PHONY: push-latest-docker-image
4348
push-latest-docker-image: ## push the docker image with the "latest" tag to the registry (DOCKER_USER and DOCKER_PASS mandatory)

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
Dockerfile describing a docker containing:
1010
- Debian Buster
11-
- OpenJDK 8 JRE
11+
- Available Java versions:
12+
- OpenJDK 8 JRE (default)
13+
- OpenJDK 8 JRE with OpenJ9
14+
- OpenJDK 11 JRE
15+
- OpenJDK 17 JRE
1216
- Docker cli 17.09.*
1317
- Git cli 2.*
1418
- Unix tools: curl, wget and unzip.

0 commit comments

Comments
 (0)