kolla/docker/cron/Dockerfile.j2
Michal Nasiadka 7a9ff37d0c Add RockyLinux 9 support
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/859570

Change Ifad1da69122381cec10be4a882f80dab665cfc33 has also been
incorporated because it would fail to build without that.

Depends-On: https://review.opendev.org/c/openstack/bifrost/+/873581

Change-Id: I7af51d07b8a939c908aa072294061def57dd67de
(cherry picked from commit 0883532434fff341c444d8fce8e28fcff3f5e769)
2023-02-21 13:06:47 +00:00

40 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ infra_image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block cron_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_package_type == 'rpm' %}
{% set cron_packages = [
'cronie',
'logrotate'
] %}
{% if base_distro_tag.startswith('stream9') or base_distro == 'rocky' %}
# NOTE(hrw): In RHEL 9 family it is done by systemd timer, we want cron to
# handle it.
COPY logrotate /etc/cron.daily/logrotate
{% endif %}
{% elif base_package_type == 'deb' %}
{% set cron_packages = [
'cron',
'logrotate'
] %}
{% endif %}
{{ macros.install_packages(cron_packages | customizable("packages")) }}
{% if base_distro_tag.startswith('stream9') or base_distro == 'rocky' %}
COPY extend_start_el9.sh /usr/local/bin/kolla_extend_start
{% else %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
{% endif %}
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block cron_footer %}{% endblock %}
{% block footer %}{% endblock %}