Skip to content

Commit

Permalink
Clean latest api doc from PortMapping and outdated error check
Browse files Browse the repository at this point in the history
Regarding the outdated error check, there's no `docker.PortMapping`
struct anymore and this is linked to something really old moby#1334

Signed-off-by: Antonio Murdaca <[email protected]>
  • Loading branch information
runcom committed Sep 3, 2015
1 parent ee4de4d commit 137c12f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions daemon/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"sync"
"syscall"
"time"
Expand Down Expand Up @@ -105,8 +104,7 @@ func (container *Container) fromDisk() error {
dec := json.NewDecoder(jsonSource)

// 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
}

Expand Down
4 changes: 1 addition & 3 deletions docs/reference/api/docker_remote_api_v1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ Return low-level information on the container `id`
"IPAddress": "",
"IPPrefixLen": 0,
"MacAddress": "",
"PortMapping": null,
"Ports": null
},
"Path": "/bin/sh",
Expand Down Expand Up @@ -2244,7 +2243,6 @@ Return low-level information about the `exec` command `id`.
"MacAddress" : "02:42:ac:11:00:02",
"Gateway" : "172.17.42.1",
"Bridge" : "docker0",
"PortMapping" : null,
"Ports" : {}
},
"ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf",
Expand All @@ -2258,7 +2256,7 @@ Return low-level information about the `exec` command `id`.
"ProcessLabel" : "",
"AppArmorProfile" : "",
"RestartCount" : 0,
"Mounts" : [],
"Mounts" : []
}
}

Expand Down

0 comments on commit 137c12f

Please sign in to comment.