From 6fe33f0b0d81e204503b32e9ba8a8512a89f10ff Mon Sep 17 00:00:00 2001 From: Lucas Mirloup <97196064+lucasmirloup@users.noreply.github.com> Date: Mon, 27 May 2024 07:29:06 +0000 Subject: [PATCH] fix(Makefile): use Docker Buildx Bake, split AMD64 & ARM compilation for local testing (#23) --- Makefile | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index e1c46a2..63bfbb1 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,6 @@ -DOCKER_IMAGE ?= lephare/php -PHP_VERSIONS ?= $(patsubst %/,%,$(sort $(dir $(wildcard */Dockerfile)))) -SUPPORTED_VERSIONS ?= 7.4 8.0 8.1 8.2 +build: + docker buildx bake --set '*.platform=linux/amd64' -.PHONY: $(PHP_VERSIONS) all - -supported: $(SUPPORTED_VERSIONS) -all: $(PHP_VERSIONS) - -$(PHP_VERSIONS): - docker buildx build -t $(DOCKER_IMAGE):$@ $@ +build-arm: + docker run --privileged --rm tonistiigi/binfmt --install all + docker buildx bake --set '*.platform=linux/arm64'