|
| 1 | +FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }} |
| 2 | +LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" |
| 3 | + |
| 4 | +{% block caso_header %}{% endblock %} |
| 5 | + |
| 6 | +{% import "macros.j2" as macros with context %} |
| 7 | + |
| 8 | +{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} |
| 9 | + {% set caso_packages = [ |
| 10 | + 'cronie', |
| 11 | + ] %} |
| 12 | +{% elif base_distro in ['debian', 'ubuntu'] %} |
| 13 | + {% set caso_packages = [ |
| 14 | + 'cron', |
| 15 | + ] %} |
| 16 | +{% endif %} |
| 17 | + |
| 18 | +{{ macros.install_packages(caso_packages | customizable("packages")) }} |
| 19 | + |
| 20 | +{{ macros.configure_user(name='caso') }} |
| 21 | + |
| 22 | +{% set caso_pip_packages = [ |
| 23 | + 'caso' |
| 24 | +] %} |
| 25 | + |
| 26 | +# NOTE(wszumski:) Upgrade pip, otherwise we hit: ModuleNotFoundError: No module |
| 27 | +# named 'setuptools_rust' when install latest cryptography module. Doesn't |
| 28 | +# really make sense to use constraints as caso is not tied to an openstack |
| 29 | +# release. |
| 30 | +RUN mkdir -p /requirements \ |
| 31 | + && curl -sSL -o /requirements/upper-constraints.txt https://releases.openstack.org/constraints/upper/{{ openstack_release }} |
| 32 | +RUN {{ macros.install_pip(["pip"]) }} |
| 33 | + |
| 34 | +RUN {{ macros.install_pip(caso_pip_packages | customizable("pip_packages"), constraints = false) }} \ |
| 35 | + && mkdir -p /etc/caso \ |
| 36 | + && chown -R caso: /etc/caso |
| 37 | + |
| 38 | +COPY extend_start.sh /usr/local/bin/kolla_extend_start |
| 39 | + |
| 40 | +RUN touch /usr/local/bin/kolla_caso_extend_start \ |
| 41 | + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_caso_extend_start |
| 42 | + |
| 43 | +{% block caso_base_footer %}{% endblock %} |
0 commit comments