docker / sbom-cli-plugin

Plugin for Docker CLI to support SBOM creation using Syft
Apache License 2.0
150 stars 15 forks source link

Temporary directories are left on disk eating up /tmp fast #22

Closed gangefors closed 2 years ago

gangefors commented 2 years ago

After running docker sbom on the same image 4 times I'm left with this in my /tmp folder.

$ du -hs /tmp/sbom-cli-plugin-*
279M    /tmp/sbom-cli-plugin-1458332103
279M    /tmp/sbom-cli-plugin-2556891745
279M    /tmp/sbom-cli-plugin-2823905553
279M    /tmp/sbom-cli-plugin-4236198233

I would rather that the command clean up after itself since doing docker sbom on larger images quickly fills up /tmp. And in some cases the content doesn't even fit into the default 2G /tmp size.

gangefors commented 2 years ago

Wow! That was fast. Thanks for the fix. I see huge potential in this feature.

wagoodman commented 2 years ago

Thanks for reporting the issue, glad you're liking the feature so far!

mpoqq commented 10 months ago

Hi @wagoodman, would it be possible to create a new release with this feature?

wagoodman commented 10 months ago

Indeed we could. syft 1.0 is around the corner, that would be the perfect time to get another release of this out.

gangefors commented 5 months ago

And in some cases the content doesn't even fit into the default 2G /tmp size.

If you want to store temp files from docker sbom somewhere else it seems that env.var. TMPDIR works to set another path for sbom temp files.

TMPDIR=<dir> docker sbom <image>