Skip to content

Commit 2748609

Browse files
fix(build, docker, dockerfile): fix panic expected stage "dockerfile" content digest label to be set!
Disable provenance to avoid creating an index manifest (result of Buildx build), which is not handled correctly with the current code. ``` panic: expected stage "dockerfile" content digest label to be set! goroutine 1 [running]: github.com/werf/werf/v2/pkg/build.(*BuildPhase).calculateStage(0x14000cf0a00, {0x104100598, 0x14000b12090}, 0x14000371680, {0x10412ad20, 0x1400095f800}) /git/pkg/build/build_phase.go:985 +0xb68 github.com/werf/werf/v2/pkg/build.(*BuildPhase).onImageStage(0x14000cf0a00, {0x104100598, 0x14000b12090}, 0x14000371680, {0x10412ad20, 0x1400095f800}) /git/pkg/build/build_phase.go:744 +0xf8 ``` Signed-off-by: Aleksei Igrychev <aleksei.igrychev@palark.com>
1 parent 2aaf46a commit 2748609

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/docker/image.go

+3
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ func CliBuild_LiveOutputWithCustomIn(ctx context.Context, rc io.ReadCloser, args
209209

210210
if useBuildx {
211211
buildOpts.EnableBuildx = true
212+
213+
// TODO: --provenance=false is a workaround for index manifests that we cannot handle properly with current code base (fix in v3).
214+
args = append([]string{"--provenance=false"}, args...)
212215
} else {
213216
var err error
214217
args, err = checkForUnsupportedOptions(ctx, args...)

0 commit comments

Comments
 (0)