-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create builder to use for multiarch #3924
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ GIT_TAG ?= $(shell git describe --tags --dirty --always) | |
# Image URL to use all building/pushing image targets | ||
PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x,linux/ppc64le | ||
CLI_PLATFORMS ?= linux/amd64,linux/arm64,darwin/amd64,darwin/arm64 | ||
VIZ_PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x,linux/ppc64le | ||
DOCKER_BUILDX_CMD ?= docker buildx | ||
IMAGE_BUILD_CMD ?= $(DOCKER_BUILDX_CMD) build | ||
IMAGE_BUILD_EXTRA_OPTS ?= | ||
|
@@ -331,14 +330,15 @@ importer-image: PLATFORMS=linux/amd64 | |
importer-image: PUSH=--load | ||
importer-image: importer-image-build | ||
|
||
|
||
# Build the kueue-viz dashboard images (frontend and backend) | ||
.PHONY: kueue-viz-image-build | ||
kueue-viz-image-build: | ||
docker run --privileged --rm tonistiigi/binfmt --install all | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not obvious to me. Can you add a comment that this is required for emulated builds for docker? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes for sure, I'm not even sure this is the best place for this. I put it in quickly because I was having trouble reproducing on my local env. /hold |
||
BUILDER=$(shell $(DOCKER_BUILDX_CMD) create --use) | ||
$(IMAGE_BUILD_CMD) \ | ||
-t $(IMAGE_REGISTRY)/kueue-viz-backend:$(GIT_TAG) \ | ||
-t $(IMAGE_REGISTRY)/kueue-viz-backend:$(RELEASE_BRANCH)-latest \ | ||
--platform=$(VIZ_PLATFORMS) \ | ||
--platform=$(PLATFORMS) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why were these changes made? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The VIZ_PLATFORMS was added since it wasn't working with multiarch builds. I figured it would be safe to remove and prefer the more generic There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see, they are the same. In that case, could you please remove VIZ_PLATFORMS everywhere? |
||
--build-arg BASE_IMAGE=$(BASE_IMAGE) \ | ||
--build-arg BUILDER_IMAGE=$(BUILDER_IMAGE) \ | ||
--build-arg CGO_ENABLED=$(CGO_ENABLED) \ | ||
|
@@ -347,18 +347,17 @@ kueue-viz-image-build: | |
$(IMAGE_BUILD_CMD) \ | ||
-t $(IMAGE_REGISTRY)/kueue-viz-frontend:$(GIT_TAG) \ | ||
-t $(IMAGE_REGISTRY)/kueue-viz-frontend:$(RELEASE_BRANCH)-latest \ | ||
--platform=$(VIZ_PLATFORMS) \ | ||
--platform=$(PLATFORMS) \ | ||
$(PUSH) \ | ||
-f ./cmd/experimental/kueue-viz/frontend/Dockerfile ./cmd/experimental/kueue-viz/frontend; \ | ||
$(DOCKER_BUILDX_CMD) rm $$BUILDER | ||
|
||
.PHONY: kueue-viz-image-push | ||
kueue-viz-image-push: PUSH=--push | ||
kueue-viz-image-push: kueue-viz-image-build | ||
|
||
# Build a docker local us-central1-docker.pkg.dev/k8s-staging-images/kueue/kueue-viz image | ||
.PHONY: kueue-viz-image | ||
kueue-viz-image: VIZ_PLATFORMS=linux/amd64 | ||
kueue-viz-image: PUSH=--load | ||
kueue-viz-image: kueue-viz-image-build | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
kueue/Makefile
Line 362 in 780675f
no need anymore, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it to fix an issue: #3883. However, since you're now using
docker buildx create --use
, that should resolve it if I understand correctly.