summaryrefslogtreecommitdiff
path: root/compose/container.py
diff options
context:
space:
mode:
Diffstat (limited to 'compose/container.py')
-rw-r--r--compose/container.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/compose/container.py b/compose/container.py
index 2c16863d..4bc7f54f 100644
--- a/compose/container.py
+++ b/compose/container.py
@@ -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 ', '.join(format_port(*item)
- for item in sorted(six.iteritems(self.ports)))
+ return [private]
+ return [
+ '{HostIp}:{HostPort}->{private}'.format(private=private, **pub)
+ for pub in public
+ ]
+
+ return ', '.join(
+ ','.join(format_port(*item))
+ for item in sorted(six.iteritems(self.ports))
+ )
@property
def labels(self):
@@ -163,7 +167,7 @@ class Container(object):
@property
def has_api_logs(self):
log_type = self.log_driver
- return not log_type or log_type != 'none'
+ return not log_type or log_type in ('json-file', 'journald')
def attach_log_stream(self):
"""A log stream can only be attached if the container uses a json-file