traefik.enable label

This commit is contained in:
emile 2015-09-10 17:31:52 +02:00
parent e2d2f1f1d1
commit 0ae325c080
2 changed files with 15 additions and 13 deletions

View file

@ -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 {