Merge pull request #908 from containous/fix-swarm-panic
Fix Swarm panic
This commit is contained in:
commit
4e527304d0
1 changed files with 4 additions and 4 deletions
|
@ -560,6 +560,10 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData {
|
||||||
if container.ContainerJSONBase.HostConfig != nil {
|
if container.ContainerJSONBase.HostConfig != nil {
|
||||||
dockerData.NetworkSettings.NetworkMode = container.ContainerJSONBase.HostConfig.NetworkMode
|
dockerData.NetworkSettings.NetworkMode = container.ContainerJSONBase.HostConfig.NetworkMode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if container.State != nil && container.State.Health != nil {
|
||||||
|
dockerData.Health = container.State.Health.Status
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if container.Config != nil && container.Config.Labels != nil {
|
if container.Config != nil && container.Config.Labels != nil {
|
||||||
|
@ -583,10 +587,6 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if container.State != nil && container.State.Health != nil {
|
|
||||||
dockerData.Health = container.State.Health.Status
|
|
||||||
}
|
|
||||||
|
|
||||||
return dockerData
|
return dockerData
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue