diff --git a/docker/centos/source/cinder/cinder-base/Dockerfile b/docker/centos/source/cinder/cinder-base/Dockerfile index b9486d6b63..209895b17a 100644 --- a/docker/centos/source/cinder/cinder-base/Dockerfile +++ b/docker/centos/source/cinder/cinder-base/Dockerfile @@ -4,7 +4,9 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./cinder.tar / RUN ln -s /cinder-* /cinder -RUN cd /cinder \ +RUN yum -y install lvm2 \ + && yum clean all \ + && cd /cinder \ && useradd --user-group cinder \ && pip install -r requirements.txt \ && pip install /cinder \ diff --git a/docker_templates/cinder/cinder-base/Dockerfile.j2 b/docker_templates/cinder/cinder-base/Dockerfile.j2 index e0ed18acbd..34d72b6e1b 100644 --- a/docker_templates/cinder/cinder-base/Dockerfile.j2 +++ b/docker_templates/cinder/cinder-base/Dockerfile.j2 @@ -6,6 +6,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-cinder \ python-automaton \ + lvm2 \ && yum clean all \ && sed -i "s|udev_rules = 1|udev_rules = 0|g" /etc/lvm/lvm.conf \ && sed -i "s|udev_sync = 1|udev_sync = 0|g" /etc/lvm/lvm.conf @@ -20,6 +21,17 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ {% endif %} {% elif install_type == 'source' %} + {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %} + +RUN yum -y install lvm2 \ + && yum clean all + + {% elif base_distro in ['ubuntu', 'debian'] %} + +RUN apt-get install -y --no-install-recommends lvm2 \ + && apt-get clean + + {% endif %} ADD ./cinder.tar / RUN ln -s /cinder-* /cinder