Skip to content

Commit

Permalink
Prevent pulling builder when building from source (#1937)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Molter73 authored Nov 5, 2024
1 parent 6014f4e commit a9eebf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 )\
Expand Down

0 comments on commit a9eebf2

Please sign in to comment.