Managing trivy fanal db in operational environment #22230
-
Hi all, We've been using harbor for some years now - great tool! Maybe unlike many folks, we use it via docker compose on a VM. We use artifact scanning selectively (we did have it enabled for all artifacts, but it consumed too many resources for us so we reduced coverage). We have found that the fanal database is getting quite large and we're not sure about the best approach to managing this. I've seen some commentary that this is essentially ephemeral content and can be safely removed and in a kubernetes content a simple pod restart can be used to clean this up. In our case, we have the trivy-adapter container and the content it manages is mounted into the container; hence fanal is persistent and a simple restart would not solve the issue for us. I have some questions:
More generally, if anyone has advice on dealing with fanal in this context, it would be appreciated. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @dh-seanmurphy , Thanks for connecting with us.
More info could refer to : #16606 |
Beta Was this translation helpful? Give feedback.
Hi @dh-seanmurphy ,
Thanks for connecting with us.
fanal.db
is a local cache for holding os/package info , metadata for each image layers that avoid keeping fetch from internet each scanning and it cause endlessly growing while you keep scanning new images.rm -rf /home/scanner/.cache/trivy/fanal
or running cmdtrivy clean --scan-cache
More info could refer to : #16606