mirror of
https://github.com/docker/docs.git
synced 2026-03-31 00:08:55 +07:00
Merge pull request #1334 from dotcloud/1314-compat_broke-fix
Discard error when loading old container format
This commit is contained in:
@@ -266,7 +266,8 @@ func (container *Container) FromDisk() error {
|
||||
return err
|
||||
}
|
||||
// Load container settings
|
||||
if err := json.Unmarshal(data, container); err != nil {
|
||||
// udp broke compat of docker.PortMapping, but it's not used when loading a container, we can skip it
|
||||
if err := json.Unmarshal(data, container); err != nil && !strings.Contains(err.Error(), "docker.PortMapping") {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user