diff options
Diffstat (limited to 'docker/base')
| -rw-r--r-- | docker/base/Dockerfile.j2 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docker/base/Dockerfile.j2 b/docker/base/Dockerfile.j2 index a3dae428a..362387247 100644 --- a/docker/base/Dockerfile.j2 +++ b/docker/base/Dockerfile.j2 @@ -1,6 +1,29 @@ FROM {{ base_distro }}:{{ base_distro_tag }} MAINTAINER Kolla Project (https://launchpad.net/kolla) +# Early failure for bases and types +{% if base_distro in ['fedora', 'centos', 'oraclelinux', 'rhel'] %} + {% if install_type not in ['source', 'binary', 'rdo', 'rhel'] %} + +RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% elif base_distro in ['ubuntu', 'debian'] %} + {% if install_type not in ['source'] %} + +RUN echo 'ERROR: {{ install_type }} is unavailable for {{ base_distro }}' \ + && /bin/false + + {% endif %} +{% else %} + +RUN echo 'ERROR: The specified distro has no Kolla images to build: "{{ base_distro }}"' \ + && /bin/false + +{% endif %} + + {{ include_header }} ENV KOLLA_BASE_DISTRO {{ base_distro }} |
