aboutsummaryrefslogtreecommitdiff
path: root/docker/ironic/ironic-base
diff options
context:
space:
mode:
Diffstat (limited to 'docker/ironic/ironic-base')
-rw-r--r--docker/ironic/ironic-base/Dockerfile.j233
1 files changed, 33 insertions, 0 deletions
diff --git a/docker/ironic/ironic-base/Dockerfile.j2 b/docker/ironic/ironic-base/Dockerfile.j2
new file mode 100644
index 000000000..0fc7e56c2
--- /dev/null
+++ b/docker/ironic/ironic-base/Dockerfile.j2
@@ -0,0 +1,33 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+# until packaging is fixed, all of this is required
+# api: policy
+# conductor:MySQL-python
+RUN yum -y install \
+ python-oslo-log \
+ python-oslo-concurrency \
+ python-oslo-policy \
+ MySQL-python \
+ && yum clean all
+
+ {% elif base_distro in ['ubuntu', 'debian'] %}
+
+RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
+ && /bin/false
+
+ {% endif %}
+{% elif install_type == 'source' %}
+
+ADD ironic.tar /
+RUN ln -s /ironic-* ironic \
+ && useradd --user-group ironic \
+ && pip --no-cache-dir install /ironic \
+ && mkdir -p /etc/ironic /var/log/ironic /home/ironic \
+ && cp -r /ironic/etc/* /etc/ironic/ \
+ && chown -R ironic: /etc/ironic /var/log/ironic /home/ironic
+
+{% endif %}