vendor: github.com/moby/moby/api, client 0769fe708773 (master)
full diff: 4ca8aedf92...0769fe7087
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -25,7 +25,7 @@ import (
|
||||
"github.com/docker/go-units"
|
||||
"github.com/go-viper/mapstructure/v2"
|
||||
"github.com/google/shlex"
|
||||
"github.com/moby/moby/api/types/container"
|
||||
"github.com/moby/moby/api/types/network"
|
||||
"github.com/moby/moby/api/types/versions"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v3"
|
||||
@ -925,7 +925,7 @@ func toServicePortConfigs(value string) ([]any, error) {
|
||||
return nil, err
|
||||
}
|
||||
// We need to sort the key of the ports to make sure it is consistent
|
||||
keys := []string{}
|
||||
keys := make([]string, 0, len(ports))
|
||||
for port := range ports {
|
||||
keys = append(keys, string(port))
|
||||
}
|
||||
@ -933,7 +933,11 @@ func toServicePortConfigs(value string) ([]any, error) {
|
||||
|
||||
for _, key := range keys {
|
||||
// Reuse ConvertPortToPortConfig so that it is consistent
|
||||
portConfig, err := swarmopts.ConvertPortToPortConfig(container.PortRangeProto(key), portBindings)
|
||||
port, err := network.ParsePort(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
portConfig, err := swarmopts.ConvertPortToPortConfig(port, portBindings)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user