Remove --port and update --publish for services to support syntaxes
Add support for simple and complex syntax to `--publish` through the use of `PortOpt`. Signed-off-by: Vincent Demeester <vincent@sbr.pm> Upstream-commit: 75bf18c9f01d050e5fccab98fb671306c7c5f6d2 Component: engine
This commit is contained in:
@ -21,7 +21,6 @@ import (
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/docker/docker/cli"
|
||||
"github.com/docker/docker/cli/command"
|
||||
servicecmd "github.com/docker/docker/cli/command/service"
|
||||
dockerclient "github.com/docker/docker/client"
|
||||
"github.com/docker/docker/opts"
|
||||
runconfigopts "github.com/docker/docker/runconfig/opts"
|
||||
@ -745,7 +744,7 @@ func convertEndpointSpec(source []string) (*swarm.EndpointSpec, error) {
|
||||
for port := range ports {
|
||||
portConfigs = append(
|
||||
portConfigs,
|
||||
servicecmd.ConvertPortToPortConfig(port, portBindings)...)
|
||||
opts.ConvertPortToPortConfig(port, portBindings)...)
|
||||
}
|
||||
|
||||
return &swarm.EndpointSpec{Ports: portConfigs}, nil
|
||||
|
||||
Reference in New Issue
Block a user