mirror of
https://github.com/docker/compose.git
synced 2025-07-01 19:04:34 +02:00
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 {
|
func buildContainerPorts(s types.ServiceConfig) nat.PortSet {
|
||||||
ports := nat.PortSet{}
|
ports := nat.PortSet{}
|
||||||
|
for _, s := range s.Expose {
|
||||||
|
p := nat.Port(s)
|
||||||
|
ports[p] = struct{}{}
|
||||||
|
}
|
||||||
for _, p := range s.Ports {
|
for _, p := range s.Ports {
|
||||||
p := nat.Port(fmt.Sprintf("%d/%s", p.Target, p.Protocol))
|
p := nat.Port(fmt.Sprintf("%d/%s", p.Target, p.Protocol))
|
||||||
ports[p] = struct{}{}
|
ports[p] = struct{}{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user