Skip to content

dockerfile: fix Windows SBOM scanner temp mount - #6941

Merged
tonistiigi merged 1 commit into
moby:masterfrom
crazy-max:fix-windows-sbom-scanner-tmp
Jul 11, 2026
Merged

dockerfile: fix Windows SBOM scanner temp mount#6941
tonistiigi merged 1 commit into
moby:masterfrom
crazy-max:fix-windows-sbom-scanner-tmp

Conversation

@crazy-max

@crazy-max crazy-max commented Jul 8, 2026

Copy link
Copy Markdown
Member

needed for docker/buildkit-syft-scanner#201
carry and closes #6093

This carries the intent of #6093 and closes it 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.

Comment thread frontend/attestations/sbom/sbom.go Outdated

scanPlatform := llb.NewConstraints(opts...).Platform
if scanPlatform != nil {
scannerImage = llb.Image(scanner, llb.Platform(*scanPlatform))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch. Updated so the scan platform is no longer passed as an LLB platform constraint for the scanner image or exec. It's now passed as plain data into the scanner callback so the scanner image stays consistent with the config resolved earlier in CreateSBOMScanner.

Comment thread frontend/attestations/sbom/sbom.go Outdated
scanPlatform := llb.NewConstraints(opts...).Platform
if scanPlatform != nil {
scannerImage = llb.Image(scanner, llb.Platform(*scanPlatform))
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the config has already been resolved in ResolveImageConfig line 43 iiuc, so switching image later would get them out of sync.

@crazy-max
crazy-max force-pushed the fix-windows-sbom-scanner-tmp branch from 29730b4 to a4e7d52 Compare July 9, 2026 08:00

@tonistiigi tonistiigi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't quite understand this. You seem to be keying this behavior on target platform but the behavior you are masking is that "there is no tmpfs support"? In that case that would depend on the build platform?

@crazy-max

crazy-max commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

In that case that would depend on the build platform?

Yes I mixed up target and build platform 🙈

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max force-pushed the fix-windows-sbom-scanner-tmp branch from a4e7d52 to 7351945 Compare July 10, 2026 07:43
@tonistiigi
tonistiigi merged commit 99a9b4e into moby:master Jul 11, 2026
192 checks passed
@crazy-max
crazy-max deleted the fix-windows-sbom-scanner-tmp branch July 11, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants