diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 9eae29d..a639dc8 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -71,8 +71,8 @@ services: - /bin/sh - -c - | - /root/dign_client/bin/wait-for 192.51.100.2:443 -t 60 -- echo "server web is up" - /root/dign_client/bin/wait-for 192.51.100.5:8080 -t 60 -- echo "server dns is up" + /opt/dign_client/bin/wait-for 192.51.100.2:443 -t 60 -- echo "server web is up" + /opt/dign_client/bin/wait-for 192.51.100.5:8080 -t 60 -- echo "server dns is up" ifconfig eth0 hw ether 02:42:C0:A8:FD:03 arp -i eth0 -s 192.0.2.130 02:42:c0:a8:fd:82 arp -i eth0 -s 192.0.2.131 02:42:C0:A8:FD:83 @@ -81,11 +81,11 @@ services: mkdir -p /root/result_tsg_diagnose/conn_traffic_status cp -rf /root/cafile_dict/certs/sets/current/gen/crt/ca-root.crt /usr/local/share/ca-certificates update-ca-certificates - cat /root/dign_client/etc/hosts >> /etc/hosts - echo '0 2 * * * /usr/local/bin/python /root/dign_client/clear_file_timeout.py' > /etc/crontabs/root - echo '0 2 * * * /usr/local/bin/python /root/dign_client/clear_file_timeout.py -d /root/result_tsg_diagnose/conn_traffic_status' > /etc/crontabs/root + cat /opt/dign_client/etc/hosts >> /etc/hosts + echo '0 2 * * * /usr/local/bin/python /opt/dign_client/clear_file_timeout.py' > /etc/crontabs/root + echo '0 2 * * * /usr/local/bin/python /opt/dign_client/clear_file_timeout.py -d /root/result_tsg_diagnose/conn_traffic_status' > /etc/crontabs/root crond - python /root/dign_client/tsg_diagnose.py -l -w NEZHA + python /opt/dign_client/tsg_diagnose.py -l -w NEZHA tail -f /dev/null diff --git a/images_build/client/Dockerfile b/images_build/client/Dockerfile index fce0a22..c8780e5 100644 --- a/images_build/client/Dockerfile +++ b/images_build/client/Dockerfile @@ -2,7 +2,7 @@ FROM python:3.6.9-alpine3.10 -ADD dign_client /root/dign_client +ADD dign_client /opt/dign_client RUN sed -i s@/dl-cdn.alpinelinux.org/@/mirrors.ustc.edu.cn/@g /etc/apk/repositories \ && apk update \ @@ -13,6 +13,6 @@ RUN sed -i s@/dl-cdn.alpinelinux.org/@/mirrors.ustc.edu.cn/@g /etc/apk/repositor && pip3 install pytelegraf \ && pip3 install dnspython -WORKDIR /root/dign_client +WORKDIR /opt/dign_client CMD tail -f /dev/null