From a9eebf25ee834b0ec86d66565dfd7f3bfd339ae9 Mon Sep 17 00:00:00 2001 From: Mauro Ezequiel Moltrasio Date: Tue, 5 Nov 2024 11:40:24 +0100 Subject: [PATCH] Prevent pulling builder when building from source (#1937) This is a workaround to a podman issue in which, adding --platform to a pull command, will cause podman to always pull the image. This is particularly annoying when testing changes to the builder image, since setting it to run will overwrite the local image and pull an existing one instead. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc4a537ef8..b8c27ca6c0 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,9 @@ ifneq ($(BUILD_BUILDER_IMAGE), false) -t quay.io/stackrox-io/collector-builder:$(COLLECTOR_BUILDER_TAG) \ -f "$(CURDIR)/builder/Dockerfile" \ "$(CURDIR)/builder" +else + docker pull --platform ${PLATFORM} \ + quay.io/stackrox-io/collector-builder:$(COLLECTOR_BUILDER_TAG) endif collector: check-builder @@ -82,7 +85,7 @@ endif start-builder: builder teardown-builder docker run -d \ --name $(COLLECTOR_BUILDER_NAME) \ - --pull missing \ + --pull never \ --platform ${PLATFORM} \ -v $(CURDIR):$(CURDIR) \ $(if $(LOCAL_SSH_PORT),-p $(LOCAL_SSH_PORT):22 )\