Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

create fanal cache at top level instead of subdirectory "fanal" #422

Open
shimish2 opened this issue Mar 10, 2022 · 3 comments
Open

create fanal cache at top level instead of subdirectory "fanal" #422

shimish2 opened this issue Mar 10, 2022 · 3 comments

Comments

@shimish2
Copy link
Contributor

Currently fanal cache being generated inside "fanal" directory.

	dir := filepath.Join(cacheDir, cacheDirName)
	if err := os.MkdirAll(dir, 0700); err != nil {
		return FSCache{}, xerrors.Errorf("failed to create cache dir: %w", err)
	}

Can we create a fanal cache at cacheDir level instead of cacheDirName

@afdesk
Copy link
Collaborator

afdesk commented Mar 10, 2022

@shimish2 why is it needed for your?

@shimish2
Copy link
Contributor Author

I am trying to integrate trivy for my oci repository server and in our oci repository storage every directory is oci layout, so when I try to integrate trivy, fanal cache is created under db directory which is not an oci layout. That's why I was looking for option if we can create db at top level.

@rchincha
Copy link

rchincha commented Mar 10, 2022

Just to be clear, the ask is whether the location of the fanal cache is configurable?
For our application, the fanal cache path and name collides with other artifacts.
Happy to post a PR if this is reasonable.
Also best if this possible from code itself since our project links with the fanal go code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants