-
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?
Conversation
|
||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
let's not use runtime
, we created integration.UnixOrWindows()
for this. I'd suggest something like this:
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is not good. /testutil/integration
should only be used in the tests, not in this frontend code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 /util/…
in this PR or refactor it later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The 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...
If we can't use As follow-up (tracking issue) we should support |
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
Maybe but not sure how to use it in this context? |
Windows does not support tmpfs so SBOM scanner create failed.
Related to docker/buildkit-syft-scanner#142