Multi-arch build

This commit is contained in:
2023-04-06 12:35:29 +02:00
parent 4550e5bbae
commit 96377203b0
4 changed files with 42 additions and 3 deletions

14
Makefile Normal file
View File

@@ -0,0 +1,14 @@
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 .