Adding support to publish on custom host port ranges
Signed-off-by: Don Kjer <don.kjer@gmail.com> Changing vendor/src/github.com/docker/libnetwork to match lindenlab/libnetwork custom-host-port-ranges-1.7 branch
This commit is contained in:
parent
1c1d0c5f6f
commit
e22508c702
3 changed files with 102 additions and 7 deletions
|
@ -2,8 +2,9 @@ package nat
|
|||
|
||||
import (
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker/pkg/parsers"
|
||||
)
|
||||
|
||||
type portSorter struct {
|
||||
|
@ -88,8 +89,8 @@ func SortPortMap(ports []Port, bindings PortMap) {
|
|||
}
|
||||
}
|
||||
|
||||
func toInt(s string) int64 {
|
||||
i, err := strconv.ParseInt(s, 10, 64)
|
||||
func toInt(s string) uint64 {
|
||||
i, _, err := parsers.ParsePortRange(s)
|
||||
if err != nil {
|
||||
i = 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue