docker / sbom-cli-plugin

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

Remove the root of all temp files on shutdown #24

Closed wagoodman closed 2 years ago

wagoodman commented 2 years ago

The stereoscope docker daemon provider uses the docker tarball provider, each provider is creating sibling temp directories within a single common temp directory. The issue issue is that the daemon provider saves the image tar in one temp dir while the tarball providers unarchives the image tar within another (sibling) temp dir. The image is being created off of the tarball provider has no visibility into the temp files created by the other provider.

This workaround uses the temp-dir-generator as a source for deleting the root temp directory.

Opened issue in upstream: https://github.com/anchore/stereoscope/issues/132 (the docker daemon provider should take care of this problem directly so that image.Cleanup() functions correctly)

Fixes #22