Open romaincabassot opened 5 months ago
After some digging, it seems that Docker >24 saves Docker images in OCI format (https://github.com/moby/moby/pull/44598).
This change is incompatible with the old Clair version bundled in clair-local-scanner (tar filetree has changed, manifest has changed, ...). I haven't found a way in Docker to fallback to legacy Docker images format but some tools are able to do it (Skopeo or regclient for example).
The actual layout in the tar changed, however the manifest did not and the manifest, prior to the mentioned change, is the source of truth for how to read the tarball. Now either the older docker-style manifest or the OCI index can be used to parse it.
Thanks for the comments @cpuguy83
@arminc I just made a PR to fix this
@romaincabassot Thanks for the PR and the fix.
@datadot Is this something you want to look at?
@arminc thanks taking a look. @romaincabassot I have been toying with a fix that is a wider fix for a couple weeks, ie upgrading CLAIR, rewrite of this tool to work with that, however I've been hitting a brick wall with the new CLAIR container being 25Gb! I'll take a look at this PR as it could be a reasonable stop gap whist I work through solution to the size!
Hello,
We use your clair-scanner since some time now and it worked well but recently we updated our Docker version and I cannot manage to get it working again.
On a Debian 12 server it failed with latest Docker engine version (26.1.3), I tried to downgrade Docker because I wasn't able to identify an issue on our side: it doesn't work with 25.0.5 but works with 24.0.9. As this server is configured with certificates, swarm, docker specific options, etc I tried the same on my Laptop (Ubuntu 22.04) with Docker engine version 26.1.3 and no specific configuration. It fails on 26.1.3, works on 24.0.9.
My local test:
Clair logs:
Is the issue known?
Thanks Romain