Adds better debugging for #1162

This commit is contained in:
Amir Raminfar
2021-04-20 13:16:27 -07:00
parent 61fbd54ec9
commit 0b3493c646

View File

@@ -205,9 +205,13 @@ func (d *dockerClient) Events(ctx context.Context) (<-chan ContainerEvent, <-cha
if !ok {
return
}
messages <- ContainerEvent{
ActorID: message.Actor.ID[:12],
Name: message.Action,
if len(message.Actor.ID) >= 12 {
messages <- ContainerEvent{
ActorID: message.Actor.ID[:12],
Name: message.Action,
}
} else {
log.Debugf("Ignoring docker event with action: %v and actorId: %v", message.Action, message.Actor.ID)
}
}
}