46 lines
1.5 KiB
Django/Jinja
46 lines
1.5 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
|
{% block labels %}
|
|
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
|
|
{% endblock %}
|
|
|
|
{% block elasticsearch_curator_header %}{% endblock %}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if base_package_type == 'rpm' %}
|
|
{% set elasticsearch_curator_packages = [
|
|
'cronie',
|
|
'python3-wheel'
|
|
] %}
|
|
{% elif base_package_type == 'deb' %}
|
|
{% set elasticsearch_curator_packages = [
|
|
'cron',
|
|
'python3-setuptools',
|
|
'python3-wheel'
|
|
] %}
|
|
{% endif %}
|
|
|
|
{{ macros.install_packages(elasticsearch_curator_packages | customizable("packages")) }}
|
|
|
|
{{ macros.configure_user(name='elasticsearch') }}
|
|
|
|
# NOTE(parallax): pin elasticsearch due to bug: https://bugs.launchpad.net/kolla/+bug/1941073
|
|
{% set elasticsearch_curator_pip_packages = [
|
|
'elasticsearch==7.13.*',
|
|
'elasticsearch-curator'
|
|
] %}
|
|
|
|
RUN {{ macros.install_pip(['pip', 'wheel', 'setuptools'], constraints=false) }} \
|
|
&& {{ macros.install_pip(elasticsearch_curator_pip_packages | customizable("pip_packages"), constraints=false) }} \
|
|
&& mkdir -p /etc/elasticsearch-curator \
|
|
&& chown -R elasticsearch: /etc/elasticsearch-curator
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
RUN chmod 644 /usr/local/bin/kolla_extend_start
|
|
|
|
{% block elasticsearch_curator_base_footer %}{% endblock %}
|
|
{% block footer %}{% endblock %}
|
|
|
|
# NOTE(dszumski): Cron runs as root but should be configured to launch Curator
|
|
# by the elasticsearch user.
|