mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
remove unmapped ports from inspect port bindings
Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
This commit is contained in:

committed by
SoMuchForSubtlety

parent
0037bffbb1
commit
97f63da67d
@ -554,7 +554,7 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named
|
||||
// Port bindings.
|
||||
// Only populate if we're using CNI to configure the network.
|
||||
if c.config.CreateNetNS {
|
||||
hostConfig.PortBindings = makeInspectPortBindings(c.config.PortMappings, c.config.ExposedPorts)
|
||||
hostConfig.PortBindings = makeInspectPortBindings(c.config.PortMappings)
|
||||
} else {
|
||||
hostConfig.PortBindings = make(map[string][]define.InspectHostPort)
|
||||
}
|
||||
|
Reference in New Issue
Block a user