ab679adcbf
Many images have 'if x86_64 then amd64 elif aarch64 then arm64' check to comply with Debian like architecture names in several projects. This patch creates 'debian_arch' variable which can be used in all Docker files (similar to 'base_arch' one). All required images got converted to use it. Change-Id: I9c5e6f13d6c9b24fe323408512bd5aef290111ad
68 lines
1.9 KiB
Django/Jinja
68 lines
1.9 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}storm:{{ tag }}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
|
|
USER root
|
|
|
|
{% block monasca_thresh_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{{ macros.configure_user(name='monasca') }}
|
|
|
|
{% if install_type == 'binary' %}
|
|
|
|
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
|
&& /bin/false
|
|
|
|
{% elif install_type == 'source' %}
|
|
|
|
{% if base_package_type == 'rpm' %}
|
|
{% set monasca_thresh_packages = [
|
|
'maven',
|
|
] %}
|
|
|
|
ENV JAVA_HOME /usr/lib/jvm/jre-1.8.0-openjdk/
|
|
|
|
{% elif base_package_type == 'deb' %}
|
|
{% set monasca_thresh_packages = [
|
|
'openjdk-8-jdk-headless',
|
|
'maven',
|
|
] %}
|
|
|
|
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-{{debian_arch}}/
|
|
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(monasca_thresh_packages | customizable("packages")) }}
|
|
|
|
ADD monasca-thresh-archive /monasca-thresh-source
|
|
ADD additions/monasca-common* /monasca-common-source
|
|
|
|
{% block monasca_thresh_source_install %}
|
|
|
|
{% set build_opts = ['-DskipTests'] %}
|
|
|
|
# FIXME(dszumski): Remove this when the following bug is fixed:
|
|
# https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1770553
|
|
{% if base_distro == 'ubuntu' %}
|
|
{% set build_opts = build_opts + ['-Djavax.net.ssl.trustStorePassword=changeit'] %}
|
|
{% endif %}
|
|
|
|
RUN cd /monasca-common-source/java \
|
|
&& mvn clean install {{ build_opts|join(' ') }} \
|
|
&& cd /monasca-thresh-source/monasca-thresh-*/thresh \
|
|
&& mvn clean package {{ build_opts|join(' ') }}
|
|
{% endblock %}
|
|
|
|
{% endif %}
|
|
|
|
# Overwrite the script inherited from Storm
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
RUN touch /usr/local/bin/kolla_monasca_extend_start \
|
|
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_monasca_extend_start
|
|
|
|
{% block monasca_thresh_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
USER monasca
|