1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 13:23:07 +01:00

fix: adds port and schema to connection again to fix clashes between same host. fixes #2279 (#2289)

* fix: adds port and schema to connection again to fix clashes between same host. fixes #2279

* fixes tests
This commit is contained in:
Amir Raminfar
2023-07-06 09:22:22 -07:00
committed by GitHub
parent e4ef784be7
commit 2c909dab09
10 changed files with 34 additions and 34 deletions

View File

@@ -141,7 +141,7 @@ func createClients(args args, localClientFactory func(map[string][]string) (dock
clients := make(map[string]docker.Client)
if localClient := createLocalClient(args, localClientFactory); localClient != nil {
clients[localClient.Host().Host] = localClient
clients[localClient.Host().ID] = localClient
}
for _, remoteHost := range args.RemoteHost {
@@ -154,12 +154,12 @@ func createClients(args args, localClientFactory func(map[string][]string) (dock
if client, err := remoteClientFactory(args.Filter, host); err == nil {
if _, err := client.ListContainers(); err == nil {
log.Debugf("Connected to local Docker Engine")
clients[client.Host().Host] = client
clients[client.Host().ID] = client
} else {
log.Warnf("Could not connect to remote host %s: %s", host.Host, err)
log.Warnf("Could not connect to remote host %s: %s", host.ID, err)
}
} else {
log.Warnf("Could not create client for %s: %s", host.Host, err)
log.Warnf("Could not create client for %s: %s", host.ID, err)
}
}