kolla/docker/cyborg/cyborg-base/Dockerfile.j2
Mark Goddard 4b792b9a43 Remove footer block from intermediate images
Only the final image in a hierarchy should have the footer block.

neutron-infoblox-ipam-agent image still has two footers because it
inherits from the neutron-server image. We set the user to root at the
beginning of that Dockerfile, so that headers and footers have the right
context.

Change-Id: I95e5bb5583be2a76e289749e8adfc303a4e7197a
2020-11-20 12:20:21 +00:00

40 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block cyborg_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='cyborg') }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD cyborg-base-archive /cyborg-base-source
{% set cyborg_base_pip_packages = [
'/cyborg'
] %}
RUN ln -s cyborg-base-source/* cyborg \
&& {{ macros.install_pip(cyborg_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/cyborg/ \
&& cp -r /cyborg/etc/cyborg/* /etc/cyborg/
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
COPY cyborg_sudoers /etc/sudoers.d/kolla_cyborg_sudoers
RUN chmod 750 /etc/sudoers.d \
&& touch /usr/local/bin/kolla_cyborg_extend_start \
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_cyborg_extend_start
{% block cyborg_footer %}{% endblock %}