File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ LOCAL_PLATFORM := linux/$(shell uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64
55VERSION ?= $(error VERSION is undefined. Usage: VERSION=x.y.z make [target])
66VER_MAJOR := $(shell echo '$(VERSION ) ' | cut -d. -f1)
77VER_MINOR := $(shell echo '$(VERSION ) ' | cut -d. -f2)
8+ BINFMT_IMAGE ?= tonistiigi/binfmt
9+ BINFMT_CMD ?= docker run --rm --privileged $(BINFMT_IMAGE ) --install all
810
911TAGS := -t $(REPO ) :v$(VER_MAJOR ) \
1012 -t $(REPO ) :v$(VER_MAJOR ) .$(VER_MINOR ) \
@@ -56,8 +58,12 @@ clean:
5658 docker buildx --builder multiarch prune -f
5759
5860prepare :
59- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
60- docker buildx create --name multiarch --driver docker-container --use || true
61+ $(BINFMT_CMD )
62+ @if ! docker buildx inspect multiarch > /dev/null 2>&1 ; then \
63+ docker buildx create --name multiarch --driver docker-container --use --platform $(PLATFORMS ) ; \
64+ else \
65+ docker buildx use multiarch; \
66+ fi
6167 docker buildx inspect --builder multiarch --bootstrap
6268
6369check-version :
You can’t perform that action at this time.
0 commit comments