307ae61454
Debian 'buster' release contains Java 11 only. So kafka, logstash, storm images needed adjustments. Change-Id: I9f1e809d0ef1955b832dd384912f880088426306
50 lines
1.6 KiB
Django/Jinja
50 lines
1.6 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
|
|
{% block kafka_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{{ macros.configure_user(name='kafka', homedir='/opt/kafka') }}
|
|
|
|
{% if base_package_type == 'rpm' %}
|
|
{% set kafka_packages = [
|
|
'java-1.8.0-openjdk-headless',
|
|
] %}
|
|
{% elif base_package_type == 'deb' %}
|
|
|
|
{% if base_distro == 'debian' %}
|
|
{% set java_version = '11' %}
|
|
{% elif base_distro == 'ubuntu' %}
|
|
{% set java_version = '8' %}
|
|
{% endif %}
|
|
|
|
{% set kafka_packages = [
|
|
'openjdk-' + java_version + '-jre-headless',
|
|
] %}
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(kafka_packages | customizable("packages")) }}
|
|
|
|
{% block kafka_version %}
|
|
ENV kafka_version=1.0.2
|
|
ENV kafka_scala_version=2.12
|
|
ENV kafka_url=https://archive.apache.org/dist/kafka/${kafka_version}/kafka_${kafka_scala_version}-${kafka_version}.tgz
|
|
ENV kafka_pkg_sha512sum=4cbcdaf8ccc4efe3d1b6275f3f2c32cf8f2f1a62104b5dd0bd9e2974160ab89d85a6e1791af8b948a413b99ed696b06ea9d4299b27ea63c3f7318dabf5761144
|
|
{% endblock %}
|
|
|
|
{% block kafka_install %}
|
|
RUN curl -sSL -o /tmp/kafka.tgz ${kafka_url} \
|
|
&& echo "${kafka_pkg_sha512sum} /tmp/kafka.tgz" | sha512sum -c \
|
|
&& tar --strip 1 -xvf /tmp/kafka.tgz -C /opt/kafka \
|
|
&& rm -f /tmp/kafka.tgz
|
|
{% endblock %}
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
RUN chmod 755 /usr/local/bin/kolla_extend_start
|
|
|
|
{% block kafka_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER kafka
|