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>
... | ... |
@@ -8,7 +8,6 @@ import ( |
8 | 8 |
"io/ioutil" |
9 | 9 |
"os" |
10 | 10 |
"path/filepath" |
11 |
- "strings" |
|
12 | 11 |
"sync" |
13 | 12 |
"syscall" |
14 | 13 |
"time" |
... | ... |
@@ -105,8 +104,7 @@ func (container *Container) fromDisk() error { |
105 | 105 |
dec := json.NewDecoder(jsonSource) |
106 | 106 |
|
107 | 107 |
// Load container settings |
108 |
- // udp broke compat of docker.PortMapping, but it's not used when loading a container, we can skip it |
|
109 |
- if err := dec.Decode(container); err != nil && !strings.Contains(err.Error(), "docker.PortMapping") { |
|
108 |
+ if err := dec.Decode(container); err != nil { |
|
110 | 109 |
return err |
111 | 110 |
} |
112 | 111 |
|
... | ... |
@@ -422,7 +422,6 @@ Return low-level information on the container `id` |
422 | 422 |
"IPAddress": "", |
423 | 423 |
"IPPrefixLen": 0, |
424 | 424 |
"MacAddress": "", |
425 |
- "PortMapping": null, |
|
426 | 425 |
"Ports": null |
427 | 426 |
}, |
428 | 427 |
"Path": "/bin/sh", |
... | ... |
@@ -2244,7 +2243,6 @@ Return low-level information about the `exec` command `id`. |
2244 | 2244 |
"MacAddress" : "02:42:ac:11:00:02", |
2245 | 2245 |
"Gateway" : "172.17.42.1", |
2246 | 2246 |
"Bridge" : "docker0", |
2247 |
- "PortMapping" : null, |
|
2248 | 2247 |
"Ports" : {} |
2249 | 2248 |
}, |
2250 | 2249 |
"ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf", |
... | ... |
@@ -2258,7 +2256,7 @@ Return low-level information about the `exec` command `id`. |
2258 | 2258 |
"ProcessLabel" : "", |
2259 | 2259 |
"AppArmorProfile" : "", |
2260 | 2260 |
"RestartCount" : 0, |
2261 |
- "Mounts" : [], |
|
2261 |
+ "Mounts" : [] |
|
2262 | 2262 |
} |
2263 | 2263 |
} |
2264 | 2264 |
|