Create lockfiles directory in CNI Dockerfile
This commit adds creating a directory for lockfiles in the CNI Docker
image. As in oslo.concurrency `lock_path` option defaults to
`OSLO_LOCK_PATH` environment variable, this variable is also set to
point to that directory.
Closes-Bug:
FROM centos:7
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Vikas Choudhary<vichoudh@redhat.com>"
+ARG OSLO_LOCK_PATH=/var/kuryr-lock
+
RUN yum install -y epel-release https://rdoproject.org/repos/rdo-release.rpm \
&& yum install -y --setopt=tsflags=nodocs python-pip iproute bridge-utils openvswitch sudo \
&& yum install -y --setopt=tsflags=nodocs gcc python-devel git \
@@ -13,7 +15,8 @@ RUN cd /opt/kuryr-kubernetes \
&& /kuryr-kubernetes/bin/pip install . \
&& virtualenv --relocatable /kuryr-kubernetes \
&& rm -fr .git \
- && yum -y history undo last
+ && yum -y history undo last \
+ && mkdir ${OSLO_LOCK_PATH}
COPY ./cni_ds_init /usr/bin/cni_ds_init
@@ -23,6 +26,7 @@ ARG CNI_BIN_DIR_PATH=/opt/cni/bin
ENV CNI_BIN_DIR_PATH ${CNI_BIN_DIR_PATH}
ARG CNI_DAEMON=False
ENV CNI_DAEMON ${CNI_DAEMON}
+ENV OSLO_LOCK_PATH=${OSLO_LOCK_PATH}
VOLUME [ "/sys/fs/cgroup" ]
ENTRYPOINT [ "cni_ds_init" ]
