Skip to content

Commit

Permalink
Change to single-arch build, separate build and push
Browse files Browse the repository at this point in the history
  • Loading branch information
ebensh committed Jun 28, 2024
1 parent f910aa3 commit 71d8187
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ docker/login/internal:

# Build the image
image/build:
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) buildx build -t $(SHORT_IMAGE_REF) . --load
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(SHORT_IMAGE_REF) .
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) tag $(IMAGE_REF) $(SHORT_IMAGE_REF)
@echo "New image tag: $(SHORT_IMAGE_REF). You might want to"
@echo "export FLEET_MANAGER_IMAGE=$(SHORT_IMAGE_REF)"
ifeq ("$(CLUSTER_TYPE)","kind")
Expand Down Expand Up @@ -557,16 +558,11 @@ image/push/emailsender: image/build/emailsender
@echo "emailsender image was pushed as $(IMAGE_REF)."
.PHONY: image/push/emailsender

# Build and push the image
image/push: image/push/fleet-manager image/push/probe
.PHONY: image/push

image/push/fleet-manager: IMAGE_REF="$(external_image_registry)/$(image_repository):$(image_tag)"
image/push/fleet-manager:
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) buildx build -t $(IMAGE_REF) --platform $(IMAGE_PLATFORM) --output "type=image,push=true" .
image/push/fleet-manager: image/build
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) push $(IMAGE_REF)
@echo
@echo "Image was pushed as $(IMAGE_REF). You might want to"
@echo "export FLEET_MANAGER_IMAGE=$(IMAGE_REF)"
@echo "Image was pushed as $(IMAGE_REF)."
.PHONY: image/push/fleet-manager

image/push/probe: IMAGE_REF="$(external_image_registry)/$(probe_image_repository):$(image_tag)"
Expand Down

0 comments on commit 71d8187

Please sign in to comment.