mirror of
https://github.com/docker/compose.git
synced 2025-07-21 12:44:54 +02:00
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.
This commit is contained in:
parent
c0dbb1c2ec
commit
c6e19e34f7
@ -224,6 +224,8 @@ class Service(object):
|
|||||||
port = str(port)
|
port = str(port)
|
||||||
if ':' in port:
|
if ':' in port:
|
||||||
port = port.split(':')[-1]
|
port = port.split(':')[-1]
|
||||||
|
if '/' not in port:
|
||||||
|
port = "%s/tcp" % port
|
||||||
ports.append(port)
|
ports.append(port)
|
||||||
container_options['ports'] = ports
|
container_options['ports'] = ports
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user