Merge pull request #29918 from dongluochen/service_inspect_pretty

add port PublishMode to service inspect --pretty output
This commit is contained in:
Vincent Demeester 2017-01-09 22:43:41 +01:00 committed by GitHub
commit f28fbb0b69
2 changed files with 2 additions and 5 deletions

View File

@ -103,6 +103,7 @@ Ports:
PublishedPort {{ $port.PublishedPort }}
Protocol = {{ $port.Protocol }}
TargetPort = {{ $port.TargetPort }}
PublishMode = {{ $port.PublishMode }}
{{- end }} {{ end -}}
`

View File

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