Skip to content

Commit e14beed

Browse files
committed
Ensure attestation parameters are passed only for multi-arch builds using buildx.
Signed-off-by: Shiva Krishna, Merla <[email protected]>
1 parent ab5a2b3 commit e14beed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deployments/container/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ DOCKER ?= docker
1717
REGCTL ?= regctl
1818
BUILDX =
1919
PUSH_ON_BUILD ?= false
20+
ATTACH_ATTESTATIONS ?= false
2021

2122
##### Global variables #####
2223
include $(CURDIR)/versions.mk
@@ -39,7 +40,7 @@ IMAGE = $(IMAGE_NAME):$(IMAGE_TAG)
3940

4041
ifeq ($(BUILD_MULTI_ARCH_IMAGES),true)
4142
BUILDX = buildx
42-
DOCKER_BUILD_OPTIONS = --output=type=image,push=$(PUSH_ON_BUILD)
43+
DOCKER_BUILD_OPTIONS = --output=type=image,push=$(PUSH_ON_BUILD) --provenance=$(ATTACH_ATTESTATIONS) --sbom=$(ATTACH_ATTESTATIONS)
4344
DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64,linux/arm64
4445
else
4546
# We also support building single-platform images.
@@ -58,7 +59,6 @@ DOCKERFILE = $(CURDIR)/deployments/container/Dockerfile
5859
build:
5960
DOCKER_BUILDKIT=1 \
6061
$(DOCKER) $(BUILDX) build --pull \
61-
--provenance=false --sbom=false \
6262
$(DOCKER_BUILD_OPTIONS) \
6363
$(DOCKER_BUILD_PLATFORM_OPTIONS) \
6464
--tag $(IMAGE) \

0 commit comments

Comments
 (0)