dockerhook icon indicating copy to clipboard operation
dockerhook copied to clipboard

only trigger by container events

Open lalyos opened this issue 6 years ago • 0 comments

Docker introduced new type of events, which are breaking dockerhook. For example in case of an image type event (like pull) the inspec() function will fail, as it was meant to inspect containers.

2019/11/24 13:51:51 [HACK] msg: &docker.APIEvents{Action:"pull", Type:"image", Actor:docker.APIActor{ID:"alpine:3.7", Attributes:map[stri$
g]string{"name":"alpine"}}, Status:"pull", ID:"alpine:3.7", From:"", Time:1574599911, TimeNano:1574599911309698300} 
panic: runtime error: slice bounds out of range

goroutine 123 [running]:
main.trigger(0xc0000a6340, 0x1, 0x1, 0xc00044d348, 0x4, 0xc00044d360, 0xa, 0xc0005ce000)
        /Users/lalyos/go/src/github.com/progrium/dockerhook/dockerhook.go:79 +0x69e
created by main.main
        /Users/lalyos/go/src/github.com/progrium/dockerhook/dockerhook.go:133 +0x6c4

lalyos avatar Nov 24 '19 14:11 lalyos