cinderlib/Dockerfile
Gorka Eguileor de1ee38d4d Add LVM CI job
This patch adds several CI jobs:

- PEP8
- Unit tests
- LVM

It also changes how we build our images. Now we only push a new image to
Docker Hub if the tests pass successfully.  And we only bother to build
the images if PEP8, Unit tests, and LVM jobs run successfully.
2018-09-06 08:43:28 +02:00

30 lines
1.0 KiB
Docker

# Based on centos this image builds cinderlib master with Cinder master branch
FROM centos:7
ARG VERSION
ARG RELEASE
LABEL maintainers="Gorka Eguileor <geguileo@redhat.com>" \
description="Cinderlib" \
version=${VERSION:-master}
RUN yum -y install targetcli iscsi-initiator-utils device-mapper-multipath epel-release lvm2 which && \
yum -y install python2-pip python-devel gcc && \
yum -y install python-rbd ceph-common git && \
# Need new setuptools version or we'll get "SyntaxError: '<' operator not allowed in environment markers" when installing Cinder
pip install 'setuptools>=38.6.0' && \
git clone 'https://github.com/openstack/cinder.git' && \
pip install --no-cache-dir cinder/ && \
pip install --no-cache-dir 'krest>=1.3.0' 'purestorage>=1.6.0' && \
rm -rf cinder && \
yum -y remove git python-devel gcc && \
yum clean all && \
rm -rf /var/cache/yum
# Copy cinderlib
COPY . /cinderlib
RUN pip install --no-cache-dir /cinderlib/ && \
rm -rf /cinderlib
# Define default command
CMD ["bash"]