added second option to get container's id

This commit is contained in:
Joachim Lusiardi 2015-02-19 20:36:15 +01:00
parent e8b8646a4e
commit 270c2b97fc
1 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,12 @@ def get_docker_id():
if index != -1: if index != -1:
id = line[index+7:-6] id = line[index+7:-6]
break break
index = line.find('docker/')
if index != -1:
id = line[index+7:]
break
if id == '':
logging.error('could not determine container\'s id!')
return id return id
def get_listen_ips(): def get_listen_ips():