Closed sakarozone closed 4 months ago
That's not a valid API endpoint, please consult the OpenAPI spec for the HTTP API documentation.
I'm not sure what klar
is, but that path seems like it may be a Clair v2 endpoint.
Klar is an integration of Clair and Docker which I was using, it allows me to analyze the images,it supports v1 and v3 This is the url - https://github.com/optiopay/klar
But regardless of that, I also tried clairctl from https://github.com/jgsqware/clairctl
With that also I get the same issue of
adding layer 1/2 [sha256:6f821]: pushing layer to clair: Post http://localhost:6060/v1/layers: dial tcp 127.0.0.1:6060: getsockopt: connection refused
My goal is to run a scan on clair and generate a report.
Is this approach right? Or am I doing something wrong?
Closing this issue as I was getting an error because I was using https://github.com/jgsqware/clairctl rather than the clairctl which is present in the clair repository itself. Thanks @hdonnay !
Hey, Im facing an issue where I get a 404 for every endpoint. A bit of background:
I have used the docker compose file that is present in the main branch of the clair repository to get my containers up.
As you can see in the screenshot below, all the services are up and running:
The traefik dashboard is also up and running:
But the issue I'm facing is that the endpoints give a 404. Even when I try to scan an image using klar, I get the same issue which is:
docker run -e CLAIR_ADDR=localhost:6060 -e KLAR_TRACE=true -e CLAIR_OUTPUT=High -it --rm myklarimage:version alpine:latest
It is getting a valid response from docker with all the layers that the image has, but it gets a 404 response when trying to POST v1/layers
This is happening for any image I scan, even if it is a docker repository that I have access to or any image whatsoever. And this is also not an issue with the klar image, as I've tried with clairctl as well for which I get the same response.
If I directly try to access it from my browser which means it is trying a GET call, it ideally says Method Not Allowed as I've seen from other places, but in my installation, all it says is 404 page not found
Environment: Docker version 24.0.5 Clair: Latest master ( so upwards of v4.7.3 but with v4.7.4 unreleased) Host OS: MacOS Sonoma
Been stuck on this for a while so any help would be really appreciated. Thank you!