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.

Change-Id: Ia69c75c34a8da4281414395805f4927de1e91a39
Closes-Bug: 1754636
This commit is contained in:
Michał Dulko 2018-03-09 12:45:04 +01:00
parent 7f77dc2380
commit fce174b7f9
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,8 @@
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" ]