Skip to content

Commit e33b79b

Browse files
authored
Fix upstream builds (#469)
1 parent b8f1269 commit e33b79b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ OCI_BIN ?= $(shell basename ${OCI_BIN_PATH})
4545
OCI_BUILD_OPTS ?=
4646
KREW_PLUGIN ?=false
4747

48+
ifeq ("$(OCI_BIN)","docker")
49+
# https://stackoverflow.com/questions/75521775/buildx-docker-image-claims-to-be-a-manifest-list
50+
EXTRA_BUILD_FLAGS ?= --provenance=false
51+
endif
52+
4853
ifneq ($(CLEAN_BUILD),)
4954
BUILD_DATE := $(shell date +%Y-%m-%d\ %H:%M)
5055
BUILD_SHA := $(shell git rev-parse --short HEAD)
@@ -58,7 +63,7 @@ YQ_VERSION = v4.45.1
5863
# build a single arch target provided as argument
5964
define build_target
6065
echo 'building image for arch $(1)'; \
61-
DOCKER_BUILDKIT=1 $(OCI_BIN) buildx build --load --build-arg LDFLAGS="${LDFLAGS}" --build-arg TARGETARCH=$(1) ${OCI_BUILD_OPTS} -t ${IMAGE}-$(1) -f Dockerfile .;
66+
DOCKER_BUILDKIT=1 $(OCI_BIN) buildx build --load --build-arg LDFLAGS="${LDFLAGS}" --build-arg TARGETARCH=$(1) ${OCI_BUILD_OPTS} ${EXTRA_BUILD_FLAGS} -t ${IMAGE}-$(1) -f Dockerfile .;
6267
endef
6368

6469
# push a single arch target image

0 commit comments

Comments
 (0)