From b46b0bec943032ec710a04ae4b2dcc9211e0cbcb Mon Sep 17 00:00:00 2001 From: root <root@localhost.localdomain> Date: Fri, 19 Jul 2019 23:32:21 +0200 Subject: [PATCH] Fixed config file path --- Dockerfile | 5 +++-- i42/modules/config.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7dfc5fb..5c1235f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ COPY i42/ /i42 RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm \ && yum install -y python36u python36u-devel python36u-pip \ -&& pip3.6 install yacron \ -&& pip3.6 install -r /i42/requirements.txt +&& ln -s /usr/bin/python3.6 /usr/bin/python3 && ln -s /usr/bin/pip3.6 /usr/bin/pip3 \ +&& pip3 install yacron \ +&& pip3 install -r /i42/requirements.txt CMD ["yacron", "-c", "i42/yacron.yaml"] diff --git a/i42/modules/config.py b/i42/modules/config.py index 8d4d3d0..04c4ed4 100644 --- a/i42/modules/config.py +++ b/i42/modules/config.py @@ -1,5 +1,6 @@ import configparser import logging +import os, sys class Config: @@ -11,7 +12,7 @@ class Config: if args.config is not None: config.read(args.config) else: - config.read('config.ini') + config.read(os.path.dirname(sys.argv[0]) + '/config.ini') # Arguments have higher precedence, if not set, config will decide if args.ipv4_only is True: -- GitLab