ORG ?= genunix VERSION = $(shell grep "ENV RESTIC_VERSION" Dockerfile | awk '{print $$3}') PLATFORMS ?= linux/arm/v7,linux/arm64/v8,linux/amd64 build-all: print-version build-version build-latest print-version: @echo "Building $(ORG)/restic:$(VERSION) for $(PLATFORMS)" build-version: docker buildx build --push --platform $(PLATFORMS) --tag $(ORG)/restic:$(VERSION) . build-latest: docker buildx build --push --platform $(PLATFORMS) --tag $(ORG)/restic:latest .