1
0
mirror of https://github.com/containous/traefik.git synced 2025-10-06 11:33:17 +03:00

Adds default rule system on Docker provider.

Co-authored-by: Julien Salleyron <julien@containo.us>
This commit is contained in:
Ludovic Fernandez
2019-01-21 19:06:02 +01:00
committed by Traefiker Bot
parent b54c956c5e
commit 04958c6951
20 changed files with 506 additions and 168 deletions

View File

@@ -142,14 +142,13 @@ func (s *BaseSuite) displayTraefikLog(c *check.C, output *bytes.Buffer) {
}
}
func (s *BaseSuite) adaptFileForHost(c *check.C, path string) string {
func (s *BaseSuite) getDockerHost() string {
dockerHost := os.Getenv("DOCKER_HOST")
if dockerHost == "" {
// Default docker socket
dockerHost = "unix:///var/run/docker.sock"
}
tempObjects := struct{ DockerHost string }{dockerHost}
return s.adaptFile(c, path, tempObjects)
return dockerHost
}
func (s *BaseSuite) adaptFile(c *check.C, path string, tempObjects interface{}) string {