Skip to content

Commit

Permalink
fix(Makefile): use Docker Buildx Bake, split AMD64 & ARM compilation …
Browse files Browse the repository at this point in the history
…for local testing (#23)
  • Loading branch information
lucasmirloup authored May 27, 2024
1 parent cee4182 commit 6fe33f0
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 6fe33f0

Please sign in to comment.