Skip to content

Commit

Permalink
Merge pull request #467 from negz/armless
Browse files Browse the repository at this point in the history
Fix multi-platform builds for arm64
  • Loading branch information
tnthornton authored Jul 12, 2024
2 parents da5cc7b + 0bc3d4b commit d6840e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 6 additions & 3 deletions cluster/images/uxp-bootstrapper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM BASEIMAGE
FROM gcr.io/distroless/static@sha256:d2b0ec3141031720cf5eedef3493b8e129bc91935a43b50562fbe5429878d96b

ADD bootstrapper /usr/local/bin/
ARG TARGETOS
ARG TARGETARCH

COPY bin/$TARGETOS\_$TARGETARCH/bootstrapper /usr/local/bin/
EXPOSE 8080
USER 65532
ENTRYPOINT ["bootstrapper"]
ENTRYPOINT ["bootstrapper"]
9 changes: 3 additions & 6 deletions cluster/images/uxp-bootstrapper/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# ====================================================================================
# Setup Project

PLATFORMS := linux_amd64 linux_arm64
include ../../../build/makelib/common.mk

# ====================================================================================
# Options
IMAGE = $(BUILD_REGISTRY)/uxp-bootstrapper-$(ARCH)
OSBASEIMAGE = gcr.io/distroless/static@sha256:d2b0ec3141031720cf5eedef3493b8e129bc91935a43b50562fbe5429878d96b

include ../../../build/makelib/imagelight.mk

# ====================================================================================
Expand All @@ -25,12 +23,11 @@ img.publish:

img.build.shared:
@cp Dockerfile $(IMAGE_TEMP_DIR) || $(FAIL)
@cp $(OUTPUT_DIR)/bin/$(OS)_$(ARCH)/bootstrapper $(IMAGE_TEMP_DIR) || $(FAIL)
@cd $(IMAGE_TEMP_DIR) && $(SED_CMD) 's|BASEIMAGE|$(OSBASEIMAGE)|g' Dockerfile || $(FAIL)
@cp -r $(OUTPUT_DIR)/bin/ $(IMAGE_TEMP_DIR)/bin || $(FAIL)
@docker buildx build $(BUILD_ARGS) \
--platform $(IMAGE_PLATFORMS) \
-t $(IMAGE) \
$(IMAGE_TEMP_DIR) || $(FAIL)

img.promote:
@$(OK) Promotion disabled $(FROM_IMAGE) to $(TO_IMAGE)
@$(OK) Promotion disabled $(FROM_IMAGE) to $(TO_IMAGE)

0 comments on commit d6840e6

Please sign in to comment.