mirror of
https://github.com/docker/compose.git
synced 2025-04-08 17:05:13 +02:00
Fix ps
output to show all ports
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
f3c1c8d158
commit
d527f24ff0
@ -96,12 +96,16 @@ class Container(object):
|
||||
def human_readable_ports(self):
|
||||
def format_port(private, public):
|
||||
if not public:
|
||||
return private
|
||||
return '{HostIp}:{HostPort}->{private}'.format(
|
||||
private=private, **public[0])
|
||||
return [private]
|
||||
return [
|
||||
'{HostIp}:{HostPort}->{private}'.format(private=private, **pub)
|
||||
for pub in public
|
||||
]
|
||||
|
||||
return ', '.join(format_port(*item)
|
||||
for item in sorted(six.iteritems(self.ports)))
|
||||
return ', '.join(
|
||||
','.join(format_port(*item))
|
||||
for item in sorted(six.iteritems(self.ports))
|
||||
)
|
||||
|
||||
@property
|
||||
def labels(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user