Files
kolla/tests/templates/docker/releaser/Dockerfile.j2
Andriy Kurilin cfa266a3a2 Allow to use configure_user macro for external templates
Commit 79a2342395 introduced an ability to
build 'in-house'/'not-built-in' projects with Kolla.

This commits extends this feature with an ability to use configure_user
macro for 'not-built-in' users.
The implementation is done the same way as for 'sources', i.e. engine
after registers new section structure as soon as it finds unknown
'<project>-user' section.

In addition, the documentation and CI are extended to cover
``--docker-dir`` option.

Change-Id: I690d9f3829083f2493bf286a1c45764b9699219b
2025-02-18 09:41:17 +01:00

26 lines
838 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block releaser_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='releaser') }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
ADD releaser-archive /releaser-source
RUN ln -s releaser-source/* /releaser \
&& {{ macros.install_pip(['/releaser'] | customizable("pip_packages")) }} \
&& mkdir -p /etc/releaser \
&& chown -R releaser: /etc/releaser \
&& chmod 750 /etc/sudoers.d \
&& touch /usr/local/bin/kolla_releaser_extend_start \
&& chmod 644 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_releaser_extend_start
{% block footer %}{% endblock %}