From e19c29924f17ad0b47b9cebe63da93ed8a3aa803 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Tue, 16 Aug 2022 13:07:00 +0200 Subject: [PATCH] makefile cleanups --- Makefile | 85 +++++++++++-------------------------------- mpd/Makefile | 13 +++---- pleroma/Makefile | 2 +- rainloop/Makefile | 16 +++++--- transmission/Makefile | 15 +++++--- webdav/Makefile | 11 ++---- 6 files changed, 51 insertions(+), 91 deletions(-) diff --git a/Makefile b/Makefile index 8c8e510..25a517d 100644 --- a/Makefile +++ b/Makefile @@ -1,75 +1,32 @@ -images=agate archivebox ansible backup buku ddclient git-daemon gitolite gitolite-pystagit rss-bridge pleroma sassc syncthing tasks tor transmission vdirsyncer xandikos nfs-server dendrite rainloop monero filite +REGISTRY=registry.monotremata.xyz +PLATFORMS=linux/amd64,linux/arm64 -.PHONY: all $(images) -all: $(images) +IMAGES=agate mpd pleroma rainloop tor transmission webdav -BUILD = make -C $@ +.PHONY: all $(IMAGES) + +all: $(IMAGES) + +BUILDX=make -C $@ buildx +# BUILDX=docker buildx build --platform $(PLATFORMS) --tag $(REGISTRY)/$@ --push $@ agate: - $(BUILD) + $(BUILDX) -archivebox: - $(BUILD) - -ansible: - $(BUILD) - -backup: - $(BUILD) - -buku: - $(BUILD) - -ddclient: - $(BUILD) - -git-daemon: - $(BUILD) - -gitolite: - $(BUILD) - -gitolite-pystagit: - $(BUILD) - -nfs-server: - $(BUILD) - -rss-bridge: - $(BUILD) +mpd: + $(BUILDX) pleroma: - $(BUILD) - -sassc: - $(BUILD) - -syncthing: - $(BUILD) - -tasks: - $(BUILD) - -tor: - $(BUILD) - -transmission: - $(BUILD) - -vdirsyncer: - $(BUILD) - -xandikos: - $(BUILD) - -dendrite: - $(BUILD) + $(BUILDX) rainloop: - $(BUILD) + $(BUILDX) -monero: - $(BUILD) +tor: + $(BUILDX) -filite: - $(BUILD) +transmission: + $(BUILDX) + +webdav: + $(BUILDX) diff --git a/mpd/Makefile b/mpd/Makefile index 5b61766..09ddb13 100644 --- a/mpd/Makefile +++ b/mpd/Makefile @@ -1,22 +1,19 @@ IMG_NAME = mpd REGISTRY=registry.monotremata.xyz IMG=$(REGISTRY)/$(IMG_NAME) -PLATFORMS=linux/amd64,linux/arm64 +PLATFORMS=linux/arm64 -.PHONY: build build-nc push +.PHONY: build push buildx build: Dockerfile docker build -t $(IMG) . +push: build + docker image push $(IMG) + buildx: Dockerfile docker buildx build \ --platform $(PLATFORMS) \ --tag $(IMG) \ --push \ . - -push: build - docker image push $(IMG) - -build-nc: Dockerfile - docker build --no-cache -t $(IMG) . diff --git a/pleroma/Makefile b/pleroma/Makefile index 0c1b1d2..0afad38 100644 --- a/pleroma/Makefile +++ b/pleroma/Makefile @@ -3,7 +3,7 @@ REGISTRY=registry.monotremata.xyz IMG=$(REGISTRY)/$(IMG_NAME) PLATFORMS=linux/amd64 -.PHONY: build buildx push +.PHONY: build push buildx build: Dockerfile entrypoint.sh docker build -t $(IMG) . diff --git a/rainloop/Makefile b/rainloop/Makefile index 8b79978..a9f873f 100644 --- a/rainloop/Makefile +++ b/rainloop/Makefile @@ -1,9 +1,9 @@ -IMG_NAME = rainloop -REGISTRY=registry.monotremata.xyz:443 - +IMG_NAME=rainloop +REGISTRY=registry.monotremata.xyz IMG=$(REGISTRY)/$(IMG_NAME) +PLATFORMS=linux/arm64 -.PHONY: build build-nc push +.PHONY: build push buildx build: Dockerfile docker build -t $(IMG) . @@ -11,5 +11,9 @@ build: Dockerfile push: build docker image push $(IMG) -build-nc: Dockerfile - docker build --no-cache -t $(IMG) . +buildx: Dockerfile + docker buildx build \ + --platform $(PLATFORMS) \ + --tag $(IMG) \ + --push \ + . diff --git a/transmission/Makefile b/transmission/Makefile index 08923aa..69a0817 100644 --- a/transmission/Makefile +++ b/transmission/Makefile @@ -1,8 +1,9 @@ -IMG_NAME = transmission -REGISTRY=registry.monotremata.xyz:443 +IMG_NAME=transmission +REGISTRY=registry.monotremata.xyz IMG=$(REGISTRY)/$(IMG_NAME) +PLATFORMS=linux/arm64 -.PHONY: build build-nc push +.PHONY: build push buildx build: Dockerfile docker build -t $(IMG) . @@ -10,5 +11,9 @@ build: Dockerfile push: build docker image push $(IMG) -build-nc: Dockerfile - docker build --no-cache -t $(IMG) . +buildx: Dockerfile + docker buildx build \ + --platform $(PLATFORMS) \ + --tag $(IMG) \ + --push \ + . diff --git a/webdav/Makefile b/webdav/Makefile index 0cc3209..cc6012b 100644 --- a/webdav/Makefile +++ b/webdav/Makefile @@ -3,20 +3,17 @@ REGISTRY=registry.monotremata.xyz IMG=$(REGISTRY)/$(IMG_NAME) PLATFORMS=linux/amd64,linux/arm64 -.PHONY: build build-nc push +.PHONY: build push buildx build: Dockerfile docker build -t $(IMG) . +push: build + docker image push $(IMG) + buildx: Dockerfile docker buildx build \ --platform $(PLATFORMS) \ --tag $(IMG) \ --push \ . - -push: build - docker image push $(IMG) - -build-nc: Dockerfile - docker build --no-cache -t $(IMG) .