mirror of https://github.com/docker/compose.git
include exposed ports in container ports config
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
377493d473
commit
94997be633
|
@ -527,6 +527,10 @@ func setBlkio(blkio *types.BlkioConfig, resources *container.Resources) {
|
|||
|
||||
func buildContainerPorts(s types.ServiceConfig) nat.PortSet {
|
||||
ports := nat.PortSet{}
|
||||
for _, s := range s.Expose {
|
||||
p := nat.Port(s)
|
||||
ports[p] = struct{}{}
|
||||
}
|
||||
for _, p := range s.Ports {
|
||||
p := nat.Port(fmt.Sprintf("%d/%s", p.Target, p.Protocol))
|
||||
ports[p] = struct{}{}
|
||||
|
|
Loading…
Reference in New Issue