Build: Fix multi-arch docker builds
Change-Id: I3968065215b696256ee819e2062ab1d3cadfcbcf
diff --git a/core/headscale/controller/Makefile b/core/headscale/controller/Makefile
index d32e0e4..67e56f2 100644
--- a/core/headscale/controller/Makefile
+++ b/core/headscale/controller/Makefile
@@ -1,3 +1,4 @@
+docker_flags=--provenance=false --sbom=false
# Image URL to use all building/pushing image targets
IMG ?= giolekva/headscale-controller:latest
@@ -87,16 +88,15 @@
.PHONY: docker-build
docker-build: test clean build_arm64 build_amd64 ## Build docker image with the manager.
- podman build --platform linux/arm64 --tag ${IMG}-arm64 .
- podman build --platform linux/amd64 --tag ${IMG}-amd64 .
+ docker build --platform linux/arm64 --tag ${IMG}-arm64 $(docker_flags) .
+ docker build --platform linux/amd64 --tag ${IMG}-amd64 $(docker_flags) .
.PHONY: docker-push
-docker-push: ## Push docker image with the manager.
- podman push ${IMG}-arm64
- podman push ${IMG}-amd64
- podman manifest create ${IMG} ${IMG}-arm64 ${IMG}-amd64
- podman manifest push ${IMG} docker://docker.io/${IMG}
- podman manifest rm ${IMG}
+docker-push: docker-build
+ docker push ${IMG}-arm64
+ docker push ${IMG}-amd64
+ docker manifest create ${IMG} ${IMG}-arm64 ${IMG}-amd64
+ docker manifest push --purge ${IMG}
##@ Deployment