summaryrefslogtreecommitdiff
path: root/docker/monasca/monasca-api/Dockerfile.j2
blob: a66c5481a8f685943e6e01b6ef3a0178f3b9bf13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM {{ namespace }}/{{ image_prefix }}monasca-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"

{% 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-api-archive /monasca-api-source

{% set monasca_api_pip_packages = [
    '/monasca-api'
] %}

RUN ln -s monasca-api-source/* monasca-api \
    && {{ macros.install_pip(monasca_api_pip_packages | customizable("pip_packages")) }}

{% endif %}

{% block monasca_api_footer %}{% endblock %}

{% block footer %}{% endblock %}

USER monasca