Replace [ and ] in frontend names

Signed-off-by: Peter Olds <polds@kyanicorp.com>
This commit is contained in:
Peter Olds 2015-11-12 17:04:19 -07:00
parent 85bbd49798
commit 481a4b2096

View file

@ -209,6 +209,9 @@ func (provider *Docker) loadDockerConfig(dockerClient *docker.Client) *types.Con
func (provider *Docker) getFrontendName(container docker.Container) string {
// Replace '.' with '-' in quoted keys because of this issue https://github.com/BurntSushi/toml/issues/78
frontendName := fmt.Sprintf("%s-%s", provider.GetFrontendRule(container), provider.GetFrontendValue(container))
frontendName = strings.Replace(frontendName, "[", "", -1)
frontendName = strings.Replace(frontendName, "]", "", -1)
return strings.Replace(frontendName, ".", "-", -1)
}