From e04428f8f52e3ef14997b16bb1f3f3e3bf1bdfe5 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 16 Jul 2019 14:50:15 +0200 Subject: [PATCH] There is no Java 8 in Debian 'buster' (part 2) Debian 'buster' release contains Java 11 only. So opendaylight and monasca-thresh images needed adjustments. Change-Id: I78f8be44436b8c8e5f58fea40a762c17e6b510a8 --- docker/monasca/monasca-thresh/Dockerfile.j2 | 9 ++++++++- docker/opendaylight/Dockerfile.j2 | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docker/monasca/monasca-thresh/Dockerfile.j2 b/docker/monasca/monasca-thresh/Dockerfile.j2 index 6897996002..47cbc6e701 100644 --- a/docker/monasca/monasca-thresh/Dockerfile.j2 +++ b/docker/monasca/monasca-thresh/Dockerfile.j2 @@ -24,8 +24,15 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/ {% elif base_package_type == 'deb' %} + + {% if base_distro == 'debian' %} + {% set java_version = '11' %} + {% elif base_distro == 'ubuntu' %} + {% set java_version = '8' %} + {% endif %} + {% set monasca_thresh_packages = [ - 'openjdk-8-jdk-headless', + 'openjdk-' + java_version + '-jdk-headless', 'maven', ] %} diff --git a/docker/opendaylight/Dockerfile.j2 b/docker/opendaylight/Dockerfile.j2 index d71f586422..9e2e24b453 100644 --- a/docker/opendaylight/Dockerfile.j2 +++ b/docker/opendaylight/Dockerfile.j2 @@ -15,10 +15,18 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build 'opendaylight', ] %} {% elif base_package_type == 'deb' %} + + {% if base_distro == 'debian' %} + {% set java_version = '11' %} + {% elif base_distro == 'ubuntu' %} + {% set java_version = '8' %} + {% endif %} + {% set opendaylight_packages = [ 'opendaylight', - 'openjdk-8-jre-headless', + 'openjdk-' + java_version + '-jre-headless', ] %} + # NOTE(egonzalez): ODL fails to install in debian family images with # existing odl user. First install odl and then allow usage of # install_packages macro for custom configs.