docker容器时指定了command,后期要修改可通过修改对应容器的config.v2.json来配置
import os, json
####################################################################################
# Options that must be configured
# docker container name
# The data type is string, example:
# name = 'TestModExec'
name = 'TestModExec'
# The command to execute when the docker container starts
# The data type is string, example:
# command = u'/usr/bin/tail'
# args = [u'-f', u'/dev/null']
command = u'/usr/local/bin/python'
args = [u'/codes/TestModExec/test.py']
####################################################################################
# The following parts should not be changed at will !!!!!!!!!!!!
#
# get docker container id
result = os.popen("docker ps --no-trunc|grep %s" % name)
res = result.read()
if res:
id_arr = res.split(' ')
if len(id_arr) >