Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Created June 29, 2018 22:57
Show Gist options
  • Save j-griffith/acb3730c8f94c59d5feefeec5bac30da to your computer and use it in GitHub Desktop.
Save j-griffith/acb3730c8f94c59d5feefeec5bac30da to your computer and use it in GitHub Desktop.
Dockerfile
# Based on centos
FROM centos:7.4.1708
LABEL maintainers="Gorka Eguileor <[email protected]>"
LABEL description="Cinderlib CSI Plugin"
RUN yum update -y && yum install -y epel-release \
https://repos.fedorapeople.org/repos/openstack/openstack-pike/rdo-release-pike-1.noarch.rpm
RUN yum update -y && yum install -y targetcli \
iscsi-initiator-utils \
device-mapper-multipath \
centos-release-openstack-pike \
openstack-cinder \
python-rbd \
ceph-common \
xfsprogs \
e2fsprogs \
btrfs-progs \
lvm2 \
python-pip \
&& rm -rf /etc/yum.repos.d/*
RUN pip install --no-cache-dir --process-dependency-links cinderlib-csi 'krest>=1.3.0'
RUN sed -i -e 's/udev_sync = 1/udev_sync = 0/g' /etc/lvm/lvm.conf \
&& sed -i -e 's/udev_rules = 1/udev_rules = 0/g' /etc/lvm/lvm.conf \
&& sed -i -e 's/use_lvmetad = 0/use_lvmetad = 1/g' /etc/lvm/lvm.conf
# This is the default port, but if we change it via CSI_ENDPOINT then this will
# no longer be relevant.
EXPOSE 50051
# Define default command
CMD ["/usr/sbin/tgtd; cinderlib-csi"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment