From b74025f4376c1eb63f950b289eba1e7490d295a8 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Wed, 2 Aug 2023 17:15:14 +0800 Subject: [PATCH] hostname --- appmanage/Dockerfile | 2 +- appmanage/hostname.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appmanage/Dockerfile b/appmanage/Dockerfile index 6e970b63..db79d8a6 100644 --- a/appmanage/Dockerfile +++ b/appmanage/Dockerfile @@ -11,7 +11,7 @@ COPY static ./static COPY requirements.txt main.py hostname.py database.sqlite ./ RUN apt update -# Install supervisord +# Install supervisords RUN apt install -y supervisor iproute2 COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/cmd.sh /cmd.sh diff --git a/appmanage/hostname.py b/appmanage/hostname.py index 01ed97c3..e9d7ad27 100644 --- a/appmanage/hostname.py +++ b/appmanage/hostname.py @@ -2,6 +2,6 @@ from api.utils.common_log import myLogger from api.utils import shell_execute shell_execute.execute_command_output_all("echo 11111 >> /tmp/test") -shell_execute.execute_command_output_all("docker ps >> /tmp/test") +shell_execute.execute_command_output_all("docker inspect websoft9-appmanage >> /tmp/test") shell_execute.execute_command_output_all("sed -i '/websoft9-appmanage/d' /etc/hosts") shell_execute.execute_command_output_all("echo $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-appmanage) websoft9-appmanage >> /etc/hosts") \ No newline at end of file