From 4fb13eff5f1eb10d62974eabb7c2ca66d016658f Mon Sep 17 00:00:00 2001 From: Kevin Griffin Date: Wed, 20 Nov 2024 09:42:38 -0500 Subject: [PATCH] adds multi architecture build (#891) Signed-off-by: Kevin Griffin --- Makefile | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 042b1374..af46a7ff 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,34 @@ .PHONY: build-keri -build-keri: - @docker buildx build --platform=linux/amd64 -f images/keripy.dockerfile --tag weboftrust/keri:1.1.22 . - @docker buildx build --platform=linux/arm64 -f images/keripy.dockerfile --tag weboftrust/keri:1.1.22-arm64 . -.PHONY: build-witness-demo -build-witness-demo: - @@docker buildx build --platform=linux/amd64 -f images/witness.demo.dockerfile --tag weboftrust/keri-witness-demo:1.1.22 . - @@docker buildx build --platform=linux/arm64 -f images/witness.demo.dockerfile --tag weboftrust/keri-witness-demo:1.1.22-arm64 . +VERSION=1.1.22 -.PHONY: publish-keri -publish-keri: - @docker push weboftrust/keri --all-tags +define DOCKER_WARNING +In order to use the multi-platform build enable the containerd image store +The containerd image store is not enabled by default. +To enable the feature for Docker Desktop: + Navigate to Settings in Docker Desktop. + In the General tab, check Use containerd for pulling and storing images. + Select Apply and Restart." +endef + +build-keri: .warn + @docker build --platform=linux/amd64,linux/arm64 -f images/keripy.dockerfile -t weboftrust/keri:$(VERSION) . + +.PHONY: build-witness-demo +build-witness-demo: .warn + @docker build --platform=linux/amd64,linux/arm64 -f images/witness.demo.dockerfile -t weboftrust/keri-witness-demo:1.1.10 . .PHONY: publish-keri-witness-demo publish-keri-witness-demo: - @docker push weboftrust/keri-witness-demo --all-tags \ No newline at end of file + @docker push weboftrust/keri-witness-demo --all-tags + +publish-keri: + @docker push weboftrust/keri:$(VERSION) + +.warn: + @echo -e ${RED}"$$DOCKER_WARNING"${NO_COLOUR} + +RED="\033[0;31m" +NO_COLOUR="\033[0m" +export DOCKER_WARNING