Check Docker connection
This commit is contained in:
parent
d313da1156
commit
0ed748f5f6
1 changed files with 5 additions and 0 deletions
|
@ -66,6 +66,11 @@ func (provider *DockerProvider) Provide(configurationChan chan <- *Configuration
|
||||||
log.Fatalf("Failed to create a client for docker, error: %s", err)
|
log.Fatalf("Failed to create a client for docker, error: %s", err)
|
||||||
} else {
|
} else {
|
||||||
provider.dockerClient = client
|
provider.dockerClient = client
|
||||||
|
info, err := provider.dockerClient.Info()
|
||||||
|
if (err != nil){
|
||||||
|
log.Fatalf("Docker connection error %+v", err)
|
||||||
|
}
|
||||||
|
log.Debug("Docker info %=v", info)
|
||||||
dockerEvents := make(chan *docker.APIEvents)
|
dockerEvents := make(chan *docker.APIEvents)
|
||||||
if (provider.Watch) {
|
if (provider.Watch) {
|
||||||
provider.dockerClient.AddEventListener(dockerEvents)
|
provider.dockerClient.AddEventListener(dockerEvents)
|
||||||
|
|
Loading…
Reference in a new issue