From 9e3fae585236c464fd25ab591b00d278c7d6463f Mon Sep 17 00:00:00 2001 From: Cameron Diver Date: Thu, 11 Apr 2019 10:20:20 +0100 Subject: [PATCH] compose: Remove unique expose entries after adding all entries Prior to this change, we would `_.uniq` the expose value before adding values from the port mappings. This could cause ports to get added twice, which would cause the supervisor to think that there is a configuration mismatch. Change-type: patch Signed-off-by: Cameron Diver --- src/compose/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compose/service.ts b/src/compose/service.ts index 0fe330d6..a0a252c1 100644 --- a/src/compose/service.ts +++ b/src/compose/service.ts @@ -279,12 +279,12 @@ export class Service { {}, ); expose = expose.concat(_.keys(imageExposedPorts)); - expose = _.uniq(expose); // Also add any exposed ports which are implied from the portMaps const exposedFromPortMappings = _.flatMap(portMaps, port => port.toExposedPortArray(), ); expose = expose.concat(exposedFromPortMappings); + expose = _.uniq(expose); delete config.expose; let devices: DockerDevice[] = [];