publishing the port is not required anymore

The autoproxy container is not requiring that port 80 must be
published anymore. This is usefull in cases when again another
proxy container is build up in front.
This commit is contained in:
Joachim Lusiardi 2016-04-05 18:58:22 +02:00
parent 99cbd96be6
commit 5ea835e695
1 changed files with 7 additions and 3 deletions

View File

@ -135,10 +135,14 @@ def get_docker_id():
def get_listen_ips():
inspect_data = client.inspect_container(get_docker_id())
logging.info('count %s', len(inspect_data['NetworkSettings']['Ports']['80/tcp']))
mappings = inspect_data['NetworkSettings']['Ports']['80/tcp']
ips = []
for data in inspect_data['NetworkSettings']['Ports']['80/tcp']:
ips.append(data['HostIp'])
if mappings is None or len(mappings) == 0:
ips.append('0.0.0.0')
else:
logging.info('count %s', len(mappings))
for data in mappings:
ips.append(data['HostIp'])
return ips
def setup_logging():