Switch to headless jre

Prefer the headless JRE wherever possible. This may be becessary to
adjust the override files for the customization of the containers where
java is installed.

Change-Id: I3479ac9e74aa9e860cf01db20bd7ab5f5cfc9c1a
changes/94/580994/8
Martin André 4 years ago
parent 3a644f7764
commit 11dcd27994
  1. 6
      docker/elasticsearch/Dockerfile.j2
  2. 4
      docker/kafka/Dockerfile.j2
  3. 18
      docker/opendaylight/Dockerfile.j2
  4. 4
      docker/zookeeper/Dockerfile.j2
  5. 6
      releasenotes/notes/prefer_headless_jre-005b5a6f17673e33.yaml

@ -10,15 +10,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set elasticsearch_packages = [
'elasticsearch',
'java-1.8.0-openjdk'
'java-1.8.0-openjdk-headless',
] %}
ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set elasticsearch_packages = [
'elasticsearch',
'openjdk-8-jre'
'default-jre-headless',
'elasticsearch',
] %}
{% if base_arch == 'x86_64' %}

@ -9,11 +9,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set kafka_packages = [
'java-1.8.0-openjdk',
'java-1.8.0-openjdk-headless',
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set kafka_packages = [
'default-jre',
'default-jre-headless',
] %}
{% endif %}

@ -9,11 +9,19 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% block opendaylight_install %}
{% set opendaylight_packages = ['opendaylight'] %}
{% if base_distro in ['debian', 'ubuntu'] %}
# 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.
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set opendaylight_packages = [
'java-1.8.0-openjdk-headless',
'opendaylight',
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set opendaylight_packages = [
'default-jre-headless',
'opendaylight',
] %}
# 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.
{% block debian_opendaylight_install_fix_block %}
{{ macros.debian_opendaylight_existing_user_fix() }}
{% endblock %}

@ -9,11 +9,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set zookeeper_packages = [
'java-1.8.0-openjdk',
'java-1.8.0-openjdk-headless',
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set zookeeper_packages = [
'default-jre',
'default-jre-headless',
] %}
{% endif %}

@ -0,0 +1,6 @@
---
features:
- |
Prefer the headless JRE wherever possible. This may be necessary to adjust
the override files for customizing the container images where java is
installed.
Loading…
Cancel
Save