mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 21:33:18 +01:00
chore: adds warning log if containers are empty using user filter (#3669)
This commit is contained in:
@@ -129,6 +129,10 @@ func (s *ContainerStore) ListContainers(labels ContainerLabels) ([]Container, er
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(validContainers) == 0 {
|
||||||
|
log.Warn().Interface("userLabels", labels).Msg("no containers found with user labels")
|
||||||
|
}
|
||||||
|
|
||||||
validIDMap := lo.KeyBy(validContainers, func(item Container) string {
|
validIDMap := lo.KeyBy(validContainers, func(item Container) string {
|
||||||
return item.ID
|
return item.ID
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ func NewClient(cli DockerCLI, host container.Host) *DockerClient {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClientWithFilters creates a new instance of Client with docker filters
|
// NewLocalClient creates a new instance of Client with docker filters
|
||||||
func NewLocalClient(hostname string) (*DockerClient, error) {
|
func NewLocalClient(hostname string) (*DockerClient, error) {
|
||||||
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation(), client.WithUserAgent("Docker-Client/Dozzle"))
|
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation(), client.WithUserAgent("Docker-Client/Dozzle"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user