update docker.py

This commit is contained in:
TooY 2023-06-05 20:15:11 +08:00
parent 42412226ba
commit 34a032607e

View file

@ -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"