Display unpublished ports in 'fig ps'

This commit is contained in:
Aanand Prasad 2014-03-04 18:00:46 +00:00
parent 2d98071e55
commit 5f5fbb3ea4
1 changed files with 2 additions and 0 deletions

View File

@ -70,6 +70,8 @@ class Container(object):
for private, public in list(self.dictionary['NetworkSettings']['Ports'].items()):
if public:
ports.append('%s->%s' % (public[0]['HostPort'], private))
else:
ports.append(private)
return ', '.join(ports)
@property