Skip to content

Commit e50833d

Browse files
committed
fix: create sbom scanner without tmpfs in windows
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
1 parent 16e8c26 commit e50833d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/attestations/sbom/sbom.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"github.com/moby/buildkit/client/llb/sourceresolver"
1313
gatewaypb "github.com/moby/buildkit/frontend/gateway/pb"
1414
"github.com/moby/buildkit/solver/result"
15+
"github.com/moby/buildkit/util/testutil/integration"
1516
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
1617
"github.com/pkg/errors"
1718
)
@@ -84,7 +85,10 @@ func CreateSBOMScanner(ctx context.Context, resolver sourceresolver.MetaResolver
8485
}
8586

8687
runscan := llb.Image(scanner).Run(runOpts...)
87-
runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs())
88+
integration.UnixOrWindows(
89+
runscan.AddMount("/tmp", llb.Scratch(), llb.Tmpfs()),
90+
runscan.AddMount("/tmp", llb.Scratch()),
91+
)
8892

8993
runscan.AddMount(path.Join(srcDir, "core", CoreSBOMName), ref, llb.Readonly)
9094
for k, extra := range extras {

0 commit comments

Comments
 (0)