mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Add support for whitelist of monitored containers
This commit is contained in:
parent
d6321bf8dc
commit
b0910ee20b
5 changed files with 60 additions and 9 deletions
|
@ -56,15 +56,11 @@ func (client dockerClient) ListContainers(fn Filter) ([]Container, error) {
|
|||
}
|
||||
|
||||
for _, runningContainer := range runningContainers {
|
||||
log.Debugf("Inspecting container %s (%s)", runningContainer.Names[0], runningContainer.Id)
|
||||
|
||||
containerInfo, err := client.api.InspectContainer(runningContainer.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.Debugf("Inspecting image %s (%s)", containerInfo.Config.Image, containerInfo.Image)
|
||||
|
||||
imageInfo, err := client.api.InspectImage(containerInfo.Image)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue