Explorar o código

Added log message to check compose file

Signed-off-by: Zuhayr Elahi <[email protected]>
Zuhayr Elahi %!s(int64=6) %!d(string=hai) anos
pai
achega
3135a0a839
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      compose/service.py

+ 4 - 0
compose/service.py

@@ -623,6 +623,10 @@ class Service(object):
         try:
             container.start()
         except APIError as ex:
+            if "driver failed programming external connectivity" in ex.explanation:
+                log.warn(
+                    "Port is already in use, check the docker-compose file to see if the same" +
+                    " port was allocated to multiple services")
             raise OperationFailedError("Cannot start service %s: %s" % (self.name, ex.explanation))
         return container