From 270c2b97fcae68730d221597bb2b3b5200eb09d7 Mon Sep 17 00:00:00 2001 From: Joachim Lusiardi Date: Thu, 19 Feb 2015 20:36:15 +0100 Subject: [PATCH] added second option to get container's id --- nginx_proxy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx_proxy.py b/nginx_proxy.py index 6b54c4b..8f29887 100755 --- a/nginx_proxy.py +++ b/nginx_proxy.py @@ -123,6 +123,12 @@ def get_docker_id(): if index != -1: id = line[index+7:-6] 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 def get_listen_ips():