Explorar o código

Fix external port config

When exposing a port externally, it seems Docker only actually exposes it
if you specify the *internal* port as `xxxx/tcp`. So add that on if it's
not there.
Aanand Prasad %!s(int64=11) %!d(string=hai) anos
pai
achega
c6e19e34f7
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      fig/service.py

+ 2 - 0
fig/service.py

@@ -224,6 +224,8 @@ class Service(object):
                 port = str(port)
                 if ':' in port:
                     port = port.split(':')[-1]
+                if '/' not in port:
+                    port = "%s/tcp" % port
                 ports.append(port)
             container_options['ports'] = ports