From 3135a0a8392e4a70d98bde16e58fd28d17904e1d Mon Sep 17 00:00:00 2001 From: Zuhayr Elahi Date: Tue, 8 Oct 2019 16:27:56 -0700 Subject: [PATCH] Added log message to check compose file Signed-off-by: Zuhayr Elahi --- compose/service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compose/service.py b/compose/service.py index 50d2c4b52..f036826f6 100644 --- a/compose/service.py +++ b/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