diff options
-rw-r--r-- | docker/Dockerfile | 5 | ||||
-rw-r--r-- | utils/logger_utils.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 2b93c260..10537ecc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -13,6 +13,7 @@ LABEL version="0.1" description="OPNFV QTIP Docker container" ENV REPOS_DIR /home/opnfv/repos ENV QTIP_DIR /home/opnfv/repos/qtip ENV PYTHONPATH /home/opnfv/repos/qtip +ENV HOME /home/opnfv WORKDIR /home/opnfv @@ -44,7 +45,7 @@ RUN apt-get install ansible --force-yes -y RUN mkdir -p ${REPOS_DIR} RUN mkdir -p /root/.ssh -RUN mkdir -p /home/opnfv/qtip/logs +RUN mkdir -p $HOME/qtip/logs RUN chmod 700 /root/.ssh #Config ansible @@ -58,4 +59,4 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng $REPOS_DIR/releng RUN pip install -r $REPOS_DIR/qtip/requirements.txt -CMD cd $REPOS_DIR/qtip && python restful_server/qtip_server.py>/var/log/qtip/run.log +CMD cd $REPOS_DIR/qtip && python restful_server/qtip_server.py>$HOME/qtip/logs/run.log diff --git a/utils/logger_utils.py b/utils/logger_utils.py index 5efc1ef5..e8817c3c 100644 --- a/utils/logger_utils.py +++ b/utils/logger_utils.py @@ -59,7 +59,7 @@ class Logger(object): class QtipLogger(Logger): - file_path = '~/qtip/logs' + file_path = '{}/qtip/logs'.format(os.environ['HOME']) def __init__(self, logger_name): super(QtipLogger, self).__init__(logger_name) |