Skip to content

Commit 4d1130a

Browse files
committed
Add java 11 image
1 parent a7d7c36 commit 4d1130a

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Makefile

Lines changed: 8 additions & 0 deletions
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-jre8u432-b06
9+
BASE_IMAGE_OPENJDK11=eclipse-temurin:11-jdk-focal
810
BASE_IMAGE_OPENJDK17=eclipse-temurin:17.0.12_7-jdk-focal
911
BASE_IMAGE_OPENJ9=adoptopenjdk/openjdk8-openj9:x86_64-ubuntu-jre8u422-b05_openj9-0.46.1
1012

@@ -13,27 +15,33 @@ 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 .
23+
docker build --build-arg base_image=$(BASE_IMAGE_OPENJDK11) --no-cache -t $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION) --target withtools .
2024

2125
docker_scan: ## scan the docker image for security vulnerabilities
2226
docker scan --accept-license --login --token $(DOCKER_SCAN_SNYK_TOKEN) &&\
2327
docker scan --accept-license --severity high $(BASE_IMAGE_NAME):$(VERSION)
2428
docker scan --accept-license --severity high $(BASE_IMAGE_NAME):$(OPENJ9_VERSION)
29+
docker scan --accept-license --severity high $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION)
2530
docker scan --accept-license --severity high $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION)
2631
docker scan --accept-license --severity high $(WITHTOOLS_IMAGE_NAME):$(VERSION)
2732
docker scan --accept-license --severity high $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION)
33+
docker scan --accept-license --severity high $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION)
2834

2935
.PHONY: push-docker-image
3036
push-docker-image: ## push the docker image to the registry (DOCKER_USER and DOCKER_PASS mandatory)
3137
@docker login -u $(DOCKER_USER) -p $(DOCKER_PASS) &&\
3238
docker push $(BASE_IMAGE_NAME):$(VERSION)
3339
docker push $(BASE_IMAGE_NAME):$(OPENJ9_VERSION)
40+
docker push $(BASE_IMAGE_NAME):$(OPENJDK11_VERSION)
3441
docker push $(BASE_IMAGE_NAME):$(OPENJDK17_VERSION)
3542
docker push $(WITHTOOLS_IMAGE_NAME):$(VERSION)
3643
docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJ9_VERSION)
44+
docker push $(WITHTOOLS_IMAGE_NAME):$(OPENJDK11_VERSION)
3745

3846
.PHONY: push-latest-docker-image
3947
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)