kolla/docker/monasca/monasca-statsd/Dockerfile.j2
Chao Guo 961224c6cf Use install-pip macro in most source images
1. Enable customization of pip packages in source
branch of most images
2. All pip packages install uniformly through
install-pip macro, user can easily customize his
own pip command (For example using a mirror)

Co-Authored-By: Mauricio Lima <mauriciolimab@gmail.com>
Change-Id: If09582039f690fa4136e8f33200d5da15e092da7
2017-02-17 08:49:32 -03:00

34 lines
863 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}monasca-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block monasca_api_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
ADD monasca-statsd-archive /monasca-statsd-source
{% set monasca_statsd_pip_packages = [
'/monasca-statsd'
] %}
# NOTE(SamYaple): <=1.3.0 do not have any packages in requirements.txt and that
# breaks pip. So removing constraints file.
RUN ln -s monasca-statsd-source/* monasca-statsd \
&& {{ macros.install_pip(monasca_statsd_pip_packages | customizable("pip_packages"), constraints = false) }}
{% endif %}
{% block monasca_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER monasca