-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: create sbom scanner without tmpfs in windows #6093
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ import ( | |
| "encoding/json" | ||
| "fmt" | ||
| "path" | ||
| "runtime" | ||
| "strings" | ||
|
|
||
| intoto "github.com/in-toto/in-toto-golang/in_toto" | ||
|
|
@@ -84,7 +85,9 @@ func CreateSBOMScanner(ctx context.Context, resolver sourceresolver.MetaResolver | |
| } | ||
|
|
||
| runscan := llb.Image(scanner).Run(runOpts...) | ||
| runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs()) | ||
| if runtime.GOOS != "windows" { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's not use integration.UnixOrWindows(
runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs()),
runscan.AddMount("/tmp", llb.Scratch()),
)There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, updated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually this is not good. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I was thinking same but do you want it to be moved example to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops, I thought this was a test. Must just been my foggy brain. If that's the case then your original code was correct, please revert and I approve. Really sorry for going around... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert and then just add Tonis' recommendation on using a cache mount. I think other than doing a TODO, let's do it within this PR... |
||
| runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs()) | ||
| } | ||
|
|
||
| runscan.AddMount(path.Join(srcDir, "core", CoreSBOMName), ref, llb.Readonly) | ||
| for k, extra := range extras { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.