소스 검색

Clean latest api doc from PortMapping and outdated error check

Regarding the outdated error check, there's no `docker.PortMapping`
struct anymore and this is linked to something really old #1334

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Antonio Murdaca 9 년 전
부모
커밋
137c12f19a
2개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 1 3
      daemon/container.go
  2. 1 3
      docs/reference/api/docker_remote_api_v1.21.md

+ 1 - 3
daemon/container.go

@@ -8,7 +8,6 @@ import (
 	"io/ioutil"
 	"io/ioutil"
 	"os"
 	"os"
 	"path/filepath"
 	"path/filepath"
-	"strings"
 	"sync"
 	"sync"
 	"syscall"
 	"syscall"
 	"time"
 	"time"
@@ -105,8 +104,7 @@ func (container *Container) fromDisk() error {
 	dec := json.NewDecoder(jsonSource)
 	dec := json.NewDecoder(jsonSource)
 
 
 	// Load container settings
 	// Load container settings
-	// udp broke compat of docker.PortMapping, but it's not used when loading a container, we can skip it
-	if err := dec.Decode(container); err != nil && !strings.Contains(err.Error(), "docker.PortMapping") {
+	if err := dec.Decode(container); err != nil {
 		return err
 		return err
 	}
 	}
 
 

+ 1 - 3
docs/reference/api/docker_remote_api_v1.21.md

@@ -422,7 +422,6 @@ Return low-level information on the container `id`
 			"IPAddress": "",
 			"IPAddress": "",
 			"IPPrefixLen": 0,
 			"IPPrefixLen": 0,
 			"MacAddress": "",
 			"MacAddress": "",
-			"PortMapping": null,
 			"Ports": null
 			"Ports": null
 		},
 		},
 		"Path": "/bin/sh",
 		"Path": "/bin/sh",
@@ -2244,7 +2243,6 @@ Return low-level information about the `exec` command `id`.
           "MacAddress" : "02:42:ac:11:00:02",
           "MacAddress" : "02:42:ac:11:00:02",
           "Gateway" : "172.17.42.1",
           "Gateway" : "172.17.42.1",
           "Bridge" : "docker0",
           "Bridge" : "docker0",
-          "PortMapping" : null,
           "Ports" : {}
           "Ports" : {}
         },
         },
         "ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf",
         "ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf",
@@ -2258,7 +2256,7 @@ Return low-level information about the `exec` command `id`.
         "ProcessLabel" : "",
         "ProcessLabel" : "",
         "AppArmorProfile" : "",
         "AppArmorProfile" : "",
         "RestartCount" : 0,
         "RestartCount" : 0,
-        "Mounts" : [],
+        "Mounts" : []
       }
       }
     }
     }