Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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


Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down