Base policy-jdk image on onap-python image 37/122637/2
authorJim Hahn <jrh3@att.com>
Wed, 14 Jul 2021 16:26:55 +0000 (12:26 -0400)
committerJim Hahn <jrh3@att.com>
Wed, 14 Jul 2021 16:53:37 +0000 (16:53 +0000)
The onap-java image only installs the java jre, but policy needs the
jdk, thus we have been uninstalling the jre and then installing the jdk.
Unfortunately, this means that the policy-jdk image does not use the
latest ONAP-specified point release for either the java jdk OR python.

With this change, the policy-jdk image will start with the onap-python
image instead, thus python, at least will be up to date, even if the jdk
is not.

Note: tried using the latest adoptjdk image, but apparently there's
something different about that image that triggers a stack overflow in
apex-pdp.  Consequently, we'll stay with the openjdk installed via
alpine "apk".  This is still java 11, which satisfies ONAP requirements,
it just isn't the point release that is preferred.

Issue-ID: POLICY-3486
Change-Id: I0959c7048a38e30927b37b58deb887cc961a2150
Signed-off-by: Jim Hahn <jrh3@att.com>
policy-jdk/alpine/src/main/docker/Dockerfile

index 4cc3ef7..7f8fd91 100644 (file)
@@ -23,7 +23,7 @@
 # $JAVA_HOME is set to /usr/lib/jvm/java-11-openjdk
 # more details at https://hub.docker.com/_/openjdk
 
-FROM onap/integration-java11:9.0.0
+FROM onap/integration-python:9.1.0
 
 LABEL maintainer="Policy Team"
 
@@ -32,7 +32,7 @@ ENV POLICY_HOME=/opt/app/policy
 USER root
 
 RUN rm -rf /opt/java/openjdk \
-    && mkdir /opt/java/openjdk \
+    && mkdir -p /opt/java/openjdk \
     && mkdir -p /usr/lib/jvm/ \
     && ln -s /opt/java/openjdk /usr/lib/jvm/java-11-openjdk \
     && apk update \