diff --git a/Makefile b/Makefile index 17d35ca1..68756b11 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,11 @@ OCI_BIN ?= $(shell basename ${OCI_BIN_PATH}) OCI_BUILD_OPTS ?= KREW_PLUGIN ?=false +ifeq ("$(OCI_BIN)","docker") +# https://stackoverflow.com/questions/75521775/buildx-docker-image-claims-to-be-a-manifest-list +EXTRA_BUILD_FLAGS ?= --provenance=false +endif + ifneq ($(CLEAN_BUILD),) BUILD_DATE := $(shell date +%Y-%m-%d\ %H:%M) BUILD_SHA := $(shell git rev-parse --short HEAD) @@ -58,7 +63,7 @@ YQ_VERSION = v4.45.1 # build a single arch target provided as argument define build_target echo 'building image for arch $(1)'; \ - DOCKER_BUILDKIT=1 $(OCI_BIN) buildx build --load --build-arg LDFLAGS="${LDFLAGS}" --build-arg TARGETARCH=$(1) ${OCI_BUILD_OPTS} -t ${IMAGE}-$(1) -f Dockerfile .; + 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 .; endef # push a single arch target image