kolla/docker/storm/Dockerfile.j2
Alex Schultz ae1322ec10 Use base_package_type
This change updates the docker files to use base_package_type instead
of doing specific distro checks for the rhel/deb generic cases. The
base_distro is still available and is used when a specific distro needs
a customization but if the differences are purely rpm vs deb, then the
base_package_type can be used.

Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5
2019-01-17 08:23:41 -07:00

43 lines
1.4 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block storm %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='storm', homedir='/opt/storm') }}
{% if base_package_type == 'rpm' %}
{% set storm_packages = [
'java-1.8.0-openjdk-headless',
] %}
{% elif base_package_type == 'deb' %}
{% set storm_packages = [
'openjdk-8-jre-headless',
] %}
{% endif %}
{{ macros.install_packages(storm_packages | customizable("packages")) }}
{% block storm_version %}
ENV storm_version=1.2.2
ENV storm_url=http://www.mirrorservice.org/sites/ftp.apache.org/storm/apache-storm-${storm_version}/apache-storm-${storm_version}.tar.gz
ENV storm_pkg_sha512sum=0a1120b8df7b22edc75f0a412d625841f72f3fb8e9ff5d413d510908d68ea1f0c17d68c1a7f1eda427b40902452e9efcae902c36499b558592e41cc1079de2e0
{% endblock %}
{% block storm_install %}
RUN curl -sSL -o /tmp/storm.tgz ${storm_url} \
&& echo "${storm_pkg_sha512sum} /tmp/storm.tgz" | sha512sum -c \
&& tar --strip 1 -xvf /tmp/storm.tgz -C /opt/storm \
&& rm -f /tmp/storm.tgz
{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block storm_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER storm