From 34a032607e1ed45b36c35ab81086febce11196f7 Mon Sep 17 00:00:00 2001 From: TooY <330282372@qq.com> Date: Mon, 5 Jun 2023 20:15:11 +0800 Subject: [PATCH] update docker.py --- appmanage/api/utils/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appmanage/api/utils/docker.py b/appmanage/api/utils/docker.py index e437b1d2..2b7500e5 100644 --- a/appmanage/api/utils/docker.py +++ b/appmanage/api/utils/docker.py @@ -129,7 +129,7 @@ def check_app_compose(app_name, customer_name): myLogger.info_logger("Set port and random password ...") library_path = "/data/library/apps/" + app_name install_path = "/data/apps/" + customer_name - port_dic = read_env(library_path + '/.env', "APP_.*_PORT") + port_dic = read_env(library_path + '/.env', "APP_.*_PORT=") # 1.判断/data/apps/app_name/.env中的port是否占用,没有被占用,方法结束(get_start_port方法) cmd1 = "docker container inspect $(docker ps -aq) | grep HostPort | awk \'{print $2}\' | sort -u" cmd2 = "netstat -tunlp | grep \"LISTEN\" | awk '{print $4}' | awk -F \":\" '{print $NF}' | sort -u"