anchore / anchore/syft

Add opt-in cache support

Open
#434 0 comments 3 reactions 0 assignees View on GitHub
enhancement I/O
Dominant language
Go
Stars
9.6k
Forks
954
Avg merge
23h 27m
Merged PRs (30d)
48

Description

Today syft does not keep a persistent cache of the underlying image information fetched from docker. As we add more subcommands to expose out the latest catalogers, it would be ideal to allow for caching of the image tar for use across multiple commands.

My vote is that this is an opt-in feature (don't feel strongly about this):
```
syft my-image:latest --cache
```
...with a env var (`SYFT_CACHE_ENABLED`) / config option (`syft.cache.enabled`) to opt-in more permanently.

I do believe that if we support this we should expose cache control commands:

```
syft cache clear [image]

syft cache list
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the syft my-image:latest CLI entry point and how image information is fetched from Docker. Compare the proposed --cache flag, SYFT_CACHE_ENABLED environment variable, syft.cache.enabled configuration option, and cache clear/list commands. Done means persistent image caching is opt-in and the requested cache controls work.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.