Enable Docker BuildKit for chaching dependencies and faster builds

After enabling it with DOCKER_BUILDKIT=1, it allows to use features like caching(--mount=type=cache) and parallel layer execution which increses speed of concurent builds which is great for local development
This commit is contained in:
Volodymyr Zotov
2025-07-10 16:36:40 -05:00
parent 285066139f
commit 583b8251d8
2 changed files with 4 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: docker-build
docker-build: test ## Build docker image with the manager.
$(CONTAINER_TOOL) build -t ${IMG} .
DOCKER_BUILDKIT=1 $(CONTAINER_TOOL) build -t ${IMG} .
.PHONY: docker-push
docker-push: ## Push docker image with the manager.