mirror of https://github.com/docker/cli.git
Merge pull request #29918 from dongluochen/service_inspect_pretty
add port PublishMode to service inspect --pretty output
This commit is contained in:
commit
f28fbb0b69
|
@ -103,6 +103,7 @@ Ports:
|
|||
PublishedPort {{ $port.PublishedPort }}
|
||||
Protocol = {{ $port.Protocol }}
|
||||
TargetPort = {{ $port.TargetPort }}
|
||||
PublishMode = {{ $port.PublishMode }}
|
||||
{{- end }} {{ end -}}
|
||||
`
|
||||
|
||||
|
|
|
@ -692,11 +692,7 @@ portLoop:
|
|||
ports := flags.Lookup(flagPublishAdd).Value.(*opts.PortOpt).Value()
|
||||
|
||||
for _, port := range ports {
|
||||
if v, ok := portSet[portConfigToString(&port)]; ok {
|
||||
if v != port {
|
||||
fmt.Println("v", v)
|
||||
return fmt.Errorf("conflicting port mapping between %v:%v/%s and %v:%v/%s", port.PublishedPort, port.TargetPort, port.Protocol, v.PublishedPort, v.TargetPort, v.Protocol)
|
||||
}
|
||||
if _, ok := portSet[portConfigToString(&port)]; ok {
|
||||
continue
|
||||
}
|
||||
//portSet[portConfigToString(&port)] = port
|
||||
|
|
Loading…
Reference in New Issue