Slow startup
kpcyrd opened this issue · 1 comments
kpcyrd commented
When using yarahunter with docker run
it's very slow to start because it's waiting for all supported sockets to time out before picking a working one. Note there are 20seconds between "connected successfully using endpoint" and "container runtime detected: docker":
% docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/tmp:/home/deepfence/output deepfenceio/yara-hunter:latest --image-name alpine:edge --json-filename=scan.json
copied size 384
copied size 1033730
server inside23 port {0xc0004dfa38 0xc0004a93c0 0xc0004df8d8 0xc0004a93d0 0xc0004a93e0 0xc0004a93f0 0xc0004a9400 0xc0004a9410 0xc0004a9420 0xc0004a9430 0xc0004df8e8 0xc0004a9440 0xc0004a9450 0xc0004a9460 0xc0004a9470 0xc0004a9480 0xc0004a93b0 0xc0004df8c8}
INFO[2022-12-11 23:53:32] trying to connect to endpoint 'unix:///var/run/docker.sock' with timeout '10s'
INFO[2022-12-11 23:53:32] connected successfully using endpoint: unix:///var/run/docker.sock
INFO[2022-12-11 23:53:32] trying to connect to endpoint 'unix:///run/containerd/containerd.sock' with timeout '10s'
WARN[2022-12-11 23:53:42] could not connect to endpoint 'unix:///run/containerd/containerd.sock': context deadline exceeded
INFO[2022-12-11 23:53:42] trying to connect to endpoint 'unix:///run/k3s/containerd/containerd.sock' with timeout '10s'
WARN[2022-12-11 23:53:52] could not connect to endpoint 'unix:///run/k3s/containerd/containerd.sock': context deadline exceeded
INFO[2022-12-11 23:53:52] container runtime detected: docker
{
"Timestamp": "2022-12-11 23:53:52.387706590 +00:00",
"Image Name": "alpine:edge",
"Image ID": "121d0da757518198deeb7d1df20aaae549834f8bc77195bbf5be1900c0144cff",
"Malware match detected are": [
]
}
ramanan-ravi commented
Closing for existing issue deepfence/vessel#21