@@ -18,49 +18,54 @@ KUMA_IMAGES = $(call build_image,$(IMAGES_RELEASE) $(IMAGES_TEST))
1818# https://docs.docker.com/develop/develop-images/build_enhancements/
1919export DOCKER_BUILDKIT := 1
2020
21+ # Docker 29+ enables provenance attestations by default, which turns pushed
22+ # single-platform images into manifest lists (image index). This breaks
23+ # `docker manifest create --amend` which expects plain image manifests.
24+ DOCKER_BUILD_OPTS ?= --provenance=false
25+
2126# add targets to build images for each arch
2227# $(1) - GOARCH to build for
2328
2429define IMAGE_TARGETS_BY_ARCH
2530.PHONY: image/static/$(1 )
2631image/static/$(1 ) : # # Dev: Rebuild `kuma-static` Docker image
27- docker build -t kumahq/static-debian11:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/static.Dockerfile .
32+ docker build $( DOCKER_BUILD_OPTS ) -t kumahq/static-debian11:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/static.Dockerfile .
2833
2934.PHONY: image/base/$(1 )
3035image/base/$(1 ) : # # Dev: Rebuild `kuma-base` Docker image
31- docker build -t kumahq/base-nossl-debian11:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/base.Dockerfile .
36+ docker build $( DOCKER_BUILD_OPTS ) -t kumahq/base-nossl-debian11:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/base.Dockerfile .
3237
3338.PHONY: image/base-root/$(1 )
3439image/base-root/$(1 ) : # # Dev: Rebuild `kuma-base-root` Docker image
35- docker build -t kumahq/base-root-debian11:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/base-root.Dockerfile .
40+ docker build $( DOCKER_BUILD_OPTS ) -t kumahq/base-root-debian11:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/base-root.Dockerfile .
3641
3742.PHONY: image/envoy/$(1 )
3843image/envoy/$(1 ) : build/artifacts-linux-$(1 ) /envoy # # Dev: Rebuild `envoy` Docker image
39- docker build -t kumahq/envoy:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/envoy.Dockerfile .
44+ docker build $( DOCKER_BUILD_OPTS ) -t kumahq/envoy:no-push-$(1 ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/envoy.Dockerfile .
4045
4146.PHONY: image/kuma-cp/$(1 )
4247image/kuma-cp/$(1 ) : image/static/$(1 ) build/artifacts-linux-$(1 ) /kuma-cp # # Dev: Rebuild `kuma-cp` Docker image
43- docker build -t $$(call build_image,kuma-cp,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-cp.Dockerfile .
48+ docker build $( DOCKER_BUILD_OPTS ) -t $$(call build_image,kuma-cp,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-cp.Dockerfile .
4449
4550.PHONY: image/kuma-dp/$(1 )
4651image/kuma-dp/$(1 ) : image/base/$(1 ) image/envoy/$(1 ) build/artifacts-linux-$(1 ) /kuma-dp build/artifacts-linux-$(1 ) /coredns # # Dev: Rebuild `kuma-dp` Docker image
47- docker build -t $$(call build_image,kuma-dp,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-dp.Dockerfile .
52+ docker build $( DOCKER_BUILD_OPTS ) -t $$(call build_image,kuma-dp,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-dp.Dockerfile .
4853
4954.PHONY: image/kumactl/$(1 )
5055image/kumactl/$(1 ) : image/base/$(1 ) build/artifacts-linux-$(1 ) /kumactl # # Dev: Rebuild `kumactl` Docker image
51- docker build -t $$(call build_image,kumactl,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kumactl.Dockerfile .
56+ docker build $( DOCKER_BUILD_OPTS ) -t $$(call build_image,kumactl,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kumactl.Dockerfile .
5257
5358.PHONY: image/kuma-init/$(1 )
5459image/kuma-init/$(1 ) : build/artifacts-linux-$(1 ) /kumactl # # Dev: Rebuild `kuma-init` Docker image
55- docker build -t $$(call build_image,kuma-init,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-init.Dockerfile .
60+ docker build $( DOCKER_BUILD_OPTS ) -t $$(call build_image,kuma-init,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-init.Dockerfile .
5661
5762.PHONY: image/kuma-cni/$(1 )
5863image/kuma-cni/$(1 ) : image/base-root/$(1 ) build/artifacts-linux-$(1 ) /kuma-cni build/artifacts-linux-$(1 ) /install-cni
59- docker build -t $$(call build_image,kuma-cni,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-cni.Dockerfile .
64+ docker build $( DOCKER_BUILD_OPTS ) -t $$(call build_image,kuma-cni,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(TOOLS_DIR ) /releases/dockerfiles/kuma-cni.Dockerfile .
6065
6166.PHONY: image/kuma-universal/$(1 )
6267image/kuma-universal/$(1 ) : image/envoy/$(1 ) build/artifacts-linux-$(1 ) /kuma-cp build/artifacts-linux-$(1 ) /kuma-dp build/artifacts-linux-$(1 ) /kumactl build/artifacts-linux-$(1 ) /kumactl build/artifacts-linux-$(1 ) /test-server build/artifacts-linux-$(1 ) /coredns
63- docker build -t $$(call build_image,kuma-universal,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(KUMA_DIR ) /test/dockerfiles/universal.Dockerfile .
68+ docker build $( DOCKER_BUILD_OPTS ) -t $$(call build_image,kuma-universal,$(1 ) ) --build-arg ARCH=$(1 ) --platform=linux/$(1 ) -f $(KUMA_DIR ) /test/dockerfiles/universal.Dockerfile .
6469endef
6570$(foreach goarch,$(SUPPORTED_GOARCHES),$(eval $(call IMAGE_TARGETS_BY_ARCH,$(goarch))))
6671
0 commit comments