From 0d9aa541afbf6c63a56e1a922bf2e14c078f8637 Mon Sep 17 00:00:00 2001 From: Jeev B Date: Fri, 6 Jan 2023 21:27:10 -0800 Subject: [PATCH] Build flyte-binary image during sandbox-bundled build (#3216) Signed-off-by: Jeev B Signed-off-by: Jeev B --- docker/sandbox-bundled/Makefile | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/docker/sandbox-bundled/Makefile b/docker/sandbox-bundled/Makefile index 2779d169e0..daef63c638 100644 --- a/docker/sandbox-bundled/Makefile +++ b/docker/sandbox-bundled/Makefile @@ -1,21 +1,19 @@ +define FLYTE_BINARY_BUILD +mkdir -p images/tar/$(1) + +docker buildx build \ + --build-arg FLYTECONSOLE_VERSION=$(FLYTECONSOLE_VERSION) \ + --platform linux/$(1) \ + --tag flyte-binary:sandbox \ + --output type=docker,dest=images/tar/$(1)/flyte-binary.tar \ + ../.. + +endef + .PHONY: flyte -flyte: FLYTE_BINARY_VERSION := latest +flyte: FLYTECONSOLE_VERSION := latest flyte: - mkdir -p images/tar/amd64 - docker pull --platform linux/amd64 \ - ghcr.io/flyteorg/flyte-binary:$(FLYTE_BINARY_VERSION) - docker tag ghcr.io/flyteorg/flyte-binary:$(FLYTE_BINARY_VERSION) \ - flyte-binary:sandbox - docker save --output images/tar/amd64/flyte-binary.tar flyte-binary:sandbox - docker rmi flyte-binary:sandbox - - mkdir -p images/tar/arm64 - docker pull --platform linux/arm64 \ - ghcr.io/flyteorg/flyte-binary:$(FLYTE_BINARY_VERSION) - docker tag ghcr.io/flyteorg/flyte-binary:$(FLYTE_BINARY_VERSION) \ - flyte-binary:sandbox - docker save --output images/tar/arm64/flyte-binary.tar flyte-binary:sandbox - docker rmi flyte-binary:sandbox + $(foreach arch,amd64 arm64,$(call FLYTE_BINARY_BUILD,$(arch))) .PHONY: manifests manifests: