Skip to content

local: fix attestation filename#6051

Merged
crazy-max merged 3 commits intomoby:masterfrom
crazy-max:local-fix-platform-attestation
Jun 25, 2025
Merged

local: fix attestation filename#6051
crazy-max merged 3 commits intomoby:masterfrom
crazy-max:local-fix-platform-attestation

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Jun 25, 2025

fixes #6049

FROM alpine AS base
ARG TARGETARCH
ARG BUILDKIT_SBOM_SCAN_STAGE=true
RUN apk add git
COPY <<EOF /out/empty_${TARGETARCH}
EOF

FROM scratch
COPY --from=base /out /
$ docker buildx build --sbom=true --output type=local,dest=./bin . && tree ./bin
./bin
├── empty_amd64
├── sbom-base.spdx.json
└── sbom.spdx.json
$ docker buildx build --sbom=true --output type=local,dest=./bin,platform-split=false . && tree ./bin
./bin
├── empty_amd64
├── sbom-base.spdx.json
└── sbom.spdx.json
$ docker buildx build --sbom=true --output type=local,dest=./bin,platform-split=true . && tree ./bin
./bin
└── linux_amd64
    ├── empty_amd64
    ├── sbom-base.spdx.json
    └── sbom.spdx.json
$ docker buildx build --sbom=true --platform=linux/amd64,linux/arm64 --output type=local,dest=./bin . && tree ./bin
./bin
├── linux_amd64
│   ├── empty_amd64
│   ├── sbom-base.spdx.json
│   └── sbom.spdx.json
└── linux_arm64
    ├── empty_arm64
    ├── sbom-base.spdx.json
    └── sbom.spdx.json
$ docker buildx build --sbom=true --platform=linux/amd64,linux/arm64 --output type=local,dest=./bin,platform-split=false . && tree ./bin
./bin
├── empty_amd64
├── empty_arm64
├── sbom-base.spdx.linux_amd64.json
├── sbom-base.spdx.linux_arm64.json
├── sbom.spdx.linux_amd64.json
└── sbom.spdx.linux_arm64.json
$ docker buildx build --sbom=true --platform=linux/amd64,linux/arm64 --output type=local,dest=./bin,platform-split=true . && tree ./bin
./bin
├── linux_amd64
│   ├── empty_amd64
│   ├── sbom-base.spdx.json
│   └── sbom.spdx.json
└── linux_arm64
    ├── empty_arm64
    ├── sbom-base.spdx.json
    └── sbom.spdx.json

@crazy-max crazy-max added this to the v0.23.2 milestone Jun 25, 2025
@crazy-max crazy-max force-pushed the local-fix-platform-attestation branch from 5dac6da to 4d192cb Compare June 25, 2025 12:41
@crazy-max crazy-max force-pushed the local-fix-platform-attestation branch from 4d192cb to 26c5e96 Compare June 25, 2025 12:42
@crazy-max crazy-max requested a review from tonistiigi June 25, 2025 12:46
@crazy-max crazy-max marked this pull request as ready for review June 25, 2025 12:46
@crazy-max crazy-max force-pushed the local-fix-platform-attestation branch 2 times, most recently from 6541c0e to 92b76a1 Compare June 25, 2025 13:29
}
stmtFS := staticfs.NewFS()
split := opt.UsePlatformSplit(isMap)
split := isMap && !opt.UsePlatformSplit(isMap)
Copy link
Member

Choose a reason for hiding this comment

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

Could be better to use a different name in here, eg. addPlatformToName, as this is slightly different from the platforms being split or not.

crazy-max and others added 3 commits June 25, 2025 18:12
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the local-fix-platform-attestation branch from 92b76a1 to 00f15ab Compare June 25, 2025 16:14
@crazy-max crazy-max requested a review from tonistiigi June 25, 2025 16:15
@crazy-max crazy-max merged commit 91ff73e into moby:master Jun 25, 2025
220 of 225 checks passed
@crazy-max crazy-max deleted the local-fix-platform-attestation branch June 25, 2025 19:12
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.

Regression with attestations local export since 0.23.0

2 participants