kolla/docker/kuryr/kuryr-base/Dockerfile.j2
Eduardo Gonzalez e759d4d539 Fix kuryr docker images
Kuryr need ovs and bridge packages to
create local bridges and ports for containers.
Creates kuryr user and adds permissions
Remove useless bootstrap tasks

Closes-Bug: #1697475

Change-Id: I4c08a21df263fdefe1fe991cb7ad41cfee65019d
2017-06-13 13:44:05 +02:00

36 lines
1.1 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block kuryr_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='kuryr') }}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD kuryr-base-archive /kuryr-base-source
{% set kuryr_base_pip_packages = [
'/kuryr-base'
] %}
# NOTE(Jeffrey4l): remove kuryr-lib constraint in upper-constraints.txt file.
# Otherwise, it will be failed.
RUN ln -s kuryr-base-source/* kuryr-base \
&& sed -i 's|^kuryr-lib===.*$||g' requirements/upper-constraints.txt \
&& {{ macros.install_pip(kuryr_base_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/kuryr \
&& chown -R kuryr: /etc/kuryr
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block kuryr_base_footer %}{% endblock %}