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:
baude
2018-01-04 12:59:33 -06:00
committed by Atomic Bot
parent 67f06cf1cf
commit 946b4ced54
10 changed files with 153 additions and 25 deletions

View File

@ -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
}