dockerfile: fix Windows SBOM scanner temp mount#6941
Open
crazy-max wants to merge 1 commit into
Open
Conversation
Signed-off-by: CrazyMax <[email protected]>
1207075 to
29730b4
Compare
tonistiigi
reviewed
Jul 9, 2026
|
|
||
| scanPlatform := llb.NewConstraints(opts...).Platform | ||
| if scanPlatform != nil { | ||
| scannerImage = llb.Image(scanner, llb.Platform(*scanPlatform)) |
Member
There was a problem hiding this comment.
What is the intended behavior in here? Doesn't this switch to a scanner image of a different architecture (eg running via emulator), not just windows?
| scanPlatform := llb.NewConstraints(opts...).Platform | ||
| if scanPlatform != nil { | ||
| scannerImage = llb.Image(scanner, llb.Platform(*scanPlatform)) | ||
| } |
Member
There was a problem hiding this comment.
Note that the config has already been resolved in ResolveImageConfig line 43 iiuc, so switching image later would get them out of sync.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
needed for docker/buildkit-syft-scanner#201
carry and closes #6093
This carries the intent of #6093 with a mount shape that works for the Windows scanner image being added in docker/buildkit-syft-scanner#201. The SBOM scanner still gets writable temp space, but Windows no longer asks BuildKit to create a tmpfs mount that the platform cannot support.
The scanner image is now resolved and run with the target scan platform, so a Windows scan uses the Windows scanner image variant. Linux scans keep the existing tmpfs mount for
/tmp, while Windows scans use a writable no-output bind mount sourced from the scanner image with/tmpcreated.