From 339c62eb5bbc939347183f981f0875cc45788732 Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Thu, 23 Mar 2023 09:26:07 +0000 Subject: Change of the Dockerfiles for java image for London rel Issue-ID: INT-2214 Signed-off-by: Lukasz Rajewski Signed-off-by: Michal Jagiello Change-Id: Ice309c620a60d3ac33e695ce4571e0cf21b33a6e --- Dockerfile | 14 +++++++++++--- README.md | 18 ++++++++++++++++-- tox.ini | 4 +++- version.properties | 2 +- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9dfd91c..e47f88b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ -FROM adoptopenjdk/openjdk11:jre-11.0.15_10-alpine +ARG java_ver=onap-java11 -LABEL maintainer="ONAP Integration team, morgan.richomme@orange.com" -LABEL Description="Reference ONAP JAVA 11 image based on alpine" +# Java v11 base image +FROM eclipse-temurin:11.0.18_10-jre-alpine AS onap-java11 + +# Java v17 base image +FROM eclipse-temurin:17.0.6_10-jre-alpine AS onap-java17 + +FROM ${java_ver} AS onap-java-final + +LABEL maintainer="ONAP Integration team" +LABEL Description="Reference ONAP JAVA image based on alpine" ENV JAVA_OPTS="-Xms256m -Xmx1g" ENV JAVA_SEC_OPTS="" diff --git a/README.md b/README.md index 67d61c0..ddd82a1 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,22 @@ This project aims to produce a reference ONAP baseline including JAVA 11 following the seccom receommendations [1] +## Build + +ONAP Java Dockerfile allows user to build ONAP base Java image based on Java 11 and Java 17. +Building each version depends on build-arg passed by user: + +- Java 11 (default) can be build using `docker build . --build-arg java_ver=onap-java11` but in that case + `--build-arg` is optional +- Java 17 can be build using `docker build . --build-arg java_ver=onap-java17` + ## versions +### 12.0.0 + +Update Dockerfile to build both Java 11 and Java 17 base images +Change base image to eclipse-temurin + ### 9.0.0 Update to Java 11.0.11 on alpine 3.13.5 @@ -33,7 +47,7 @@ under /app/app.jar. You may specify two env variables to customize the way you are starting java: -- ENV JAVA_OPTS: by default set to -Xms256m -Xmx1g -- ENV JAVA_SEC_OPTS: empty by default +- ENV JAVA\_OPTS: by default set to -Xms256m -Xmx1g +- ENV JAVA\_SEC\_OPTS: empty by default [1]: https://git.onap.org/integration/seccom/tree/recommended_versions.yaml diff --git a/tox.ini b/tox.ini index 9a019f4..34accc5 100644 --- a/tox.ini +++ b/tox.ini @@ -5,11 +5,13 @@ skipsdist = true requires = pip >= 8 [testenv] -basepython = python3 +basepython = python3.8 whitelist_externals = git bash deps = + pyyaml == 3.13 + bandit == 1.3 coala-bears nodeenv diff --git a/version.properties b/version.properties index c35f669..be7a4a9 100644 --- a/version.properties +++ b/version.properties @@ -3,7 +3,7 @@ # Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... ) # because they are used in Jenkins, whose plug-in doesn't support -major_version=9 +major_version=12 minor_version=0 patch_version=0 -- cgit 1.2.3-korg