Add creation of /var/run/dragonflow directory in docker

When running Dragonflow controller in container, an exception is thrown
as the /var/run/dragonflow directory does not exist

Change-Id: Ie2f83d5b34a1fd1fe6b6e0fe9975a24f1d6eeb6b
Closes-Bug: #1808816
This commit is contained in:
Shachar Snapiri 2018-12-17 16:14:33 +02:00 committed by Omer Anson
parent f016d8433f
commit 5167fd3b70
2 changed files with 6 additions and 10 deletions

View File

@ -10,7 +10,9 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y $DRAGONFLOW_PACKAGES
RUN mkdir -p /opt/dragonflow
# Create config folder
ENV DRAGONFLOW_ETCDIR /etc/dragonflow
RUN mkdir -p $DRAGONFLOW_ETCDIR /opt/dragonflow /var/run/dragonflow
# Copy Dragonflow sources to the container
COPY . /opt/dragonflow/
@ -19,9 +21,5 @@ COPY . /opt/dragonflow/
WORKDIR /opt/dragonflow
RUN pip install -e .
# Create config folder
ENV DRAGONFLOW_ETCDIR /etc/dragonflow
RUN mkdir -p $DRAGONFLOW_ETCDIR
ENTRYPOINT ["./tools/run_dragonflow.sh"]

View File

@ -6,7 +6,9 @@ RUN dnf install -y git python3-pip python3-psutil python3-devel \
RUN alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
RUN mkdir -p /opt/dragonflow
# Create config folder
ENV DRAGONFLOW_ETCDIR /etc/dragonflow
RUN mkdir -p $DRAGONFLOW_ETCDIR /opt/dragonflow /var/run/dragonflow
# Copy Dragonflow sources to the container
COPY . /opt/dragonflow/
@ -15,9 +17,5 @@ COPY . /opt/dragonflow/
WORKDIR /opt/dragonflow
RUN pip install -e .
# Create config folder
ENV DRAGONFLOW_ETCDIR /etc/dragonflow
RUN mkdir -p $DRAGONFLOW_ETCDIR
ENTRYPOINT ["./tools/run_dragonflow.sh"]