traefik.enable label
This commit is contained in:
parent
e2d2f1f1d1
commit
0ae325c080
2 changed files with 15 additions and 13 deletions
|
@ -82,9 +82,11 @@ func (provider *DockerProvider) loadDockerConfig() *Configuration {
|
|||
containersInspected := []docker.Container{}
|
||||
hosts := map[string][]docker.Container{}
|
||||
for _, container := range containerList {
|
||||
containerInspected, _ := provider.dockerClient.InspectContainer(container.ID)
|
||||
containersInspected = append(containersInspected, *containerInspected)
|
||||
hosts[getHost(*containerInspected)] = append(hosts[getHost(*containerInspected)], *containerInspected)
|
||||
if(container.Labels["traefik.enable"] != "false"){
|
||||
containerInspected, _ := provider.dockerClient.InspectContainer(container.ID)
|
||||
containersInspected = append(containersInspected, *containerInspected)
|
||||
hosts[getHost(*containerInspected)] = append(hosts[getHost(*containerInspected)], *containerInspected)
|
||||
}
|
||||
}
|
||||
|
||||
templateObjects := struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue