kolla/docker/zookeeper/Dockerfile.j2
tonybrad 695d4d603d Update zookeeper v3.4.10 to v3.4.13
Change-Id: Ic352219e6447c52c744f902af5c3a8ef4d2322cf
2018-08-02 16:26:14 +08:00

42 lines
1.4 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block zookeeper_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='zookeeper', homedir='/opt/zookeeper') }}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set zookeeper_packages = [
'java-1.8.0-openjdk-headless',
] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set zookeeper_packages = [
'default-jre-headless',
] %}
{% endif %}
{{ macros.install_packages(zookeeper_packages | customizable("packages")) }}
{% block zookeeper_version %}
ENV zookeeper_version=3.4.13
ENV zookeeper_url=http://apache.mirror.anlx.net/zookeeper/zookeeper-${zookeeper_version}/zookeeper-${zookeeper_version}.tar.gz
ENV zookeeper_pkg_sha1sum=a989b527f3f990d471e6d47ee410e57d8be7620b
{% endblock %}
{% block zookeeper_binary_install %}
RUN curl -sSL -o /tmp/zookeeper.tar.gz ${zookeeper_url} \
&& echo "${zookeeper_pkg_sha1sum} /tmp/zookeeper.tar.gz" | sha1sum -c \
&& tar --strip 1 -xvf /tmp/zookeeper.tar.gz -C /opt/zookeeper \
&& rm -f /tmp/zookeeper.tar.gz
{% endblock %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block zookeeper_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER zookeeper