mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
Enable port bindings
Set up nbetworking ports for the following use cases: * bind the same port between host and container * bind a specific host port to a different container port * bind a random host port to a specific container port Signed-off-by: baude <bbaude@redhat.com> Closes: #214 Approved by: baude
This commit is contained in:
@ -584,7 +584,7 @@ func WithNetNS(portMappings []ocicni.PortMapping) CtrCreateOption {
|
||||
}
|
||||
|
||||
ctr.config.CreateNetNS = true
|
||||
copy(ctr.config.PortMappings, portMappings)
|
||||
ctr.config.PortMappings = portMappings
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user