mirror of
https://github.com/containous/traefik.git
synced 2025-01-11 05:17:52 +03:00
Fix Swarm panic
This commit is contained in:
parent
055cd01bb7
commit
841be8d806
@ -560,6 +560,10 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData {
|
||||
if container.ContainerJSONBase.HostConfig != nil {
|
||||
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 {
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user