Merge branch 'v1.4' into master
This commit is contained in:
commit
3d452fd5b9
4 changed files with 79 additions and 4 deletions
|
@ -673,8 +673,12 @@ func listContainers(ctx context.Context, dockerClient client.ContainerAPIClient)
|
|||
if err != nil {
|
||||
log.Warnf("Failed to inspect container %s, error: %s", container.ID, err)
|
||||
} else {
|
||||
dockerData := parseContainer(containerInspected)
|
||||
containersInspected = append(containersInspected, dockerData)
|
||||
// This condition is here to avoid to have empty IP https://github.com/containous/traefik/issues/2459
|
||||
// We register only container which are running
|
||||
if containerInspected.ContainerJSONBase != nil && containerInspected.ContainerJSONBase.State != nil && containerInspected.ContainerJSONBase.State.Running {
|
||||
dockerData := parseContainer(containerInspected)
|
||||
containersInspected = append(containersInspected, dockerData)
|
||||
}
|
||||
}
|
||||
}
|
||||
return containersInspected, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue