makefile cleanups

main
Ricard Illa 2022-08-16 13:07:00 +02:00
parent d7f6afed8e
commit e19c29924f
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
6 changed files with 51 additions and 91 deletions

View File

@ -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) IMAGES=agate mpd pleroma rainloop tor transmission webdav
all: $(images)
BUILD = make -C $@ .PHONY: all $(IMAGES)
all: $(IMAGES)
BUILDX=make -C $@ buildx
# BUILDX=docker buildx build --platform $(PLATFORMS) --tag $(REGISTRY)/$@ --push $@
agate: agate:
$(BUILD) $(BUILDX)
archivebox: mpd:
$(BUILD) $(BUILDX)
ansible:
$(BUILD)
backup:
$(BUILD)
buku:
$(BUILD)
ddclient:
$(BUILD)
git-daemon:
$(BUILD)
gitolite:
$(BUILD)
gitolite-pystagit:
$(BUILD)
nfs-server:
$(BUILD)
rss-bridge:
$(BUILD)
pleroma: pleroma:
$(BUILD) $(BUILDX)
sassc:
$(BUILD)
syncthing:
$(BUILD)
tasks:
$(BUILD)
tor:
$(BUILD)
transmission:
$(BUILD)
vdirsyncer:
$(BUILD)
xandikos:
$(BUILD)
dendrite:
$(BUILD)
rainloop: rainloop:
$(BUILD) $(BUILDX)
monero: tor:
$(BUILD) $(BUILDX)
filite: transmission:
$(BUILD) $(BUILDX)
webdav:
$(BUILDX)

View File

@ -1,22 +1,19 @@
IMG_NAME = mpd IMG_NAME = mpd
REGISTRY=registry.monotremata.xyz REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME) IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/amd64,linux/arm64 PLATFORMS=linux/arm64
.PHONY: build build-nc push .PHONY: build push buildx
build: Dockerfile build: Dockerfile
docker build -t $(IMG) . docker build -t $(IMG) .
push: build
docker image push $(IMG)
buildx: Dockerfile buildx: Dockerfile
docker buildx build \ docker buildx build \
--platform $(PLATFORMS) \ --platform $(PLATFORMS) \
--tag $(IMG) \ --tag $(IMG) \
--push \ --push \
. .
push: build
docker image push $(IMG)
build-nc: Dockerfile
docker build --no-cache -t $(IMG) .

View File

@ -3,7 +3,7 @@ REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME) IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/amd64 PLATFORMS=linux/amd64
.PHONY: build buildx push .PHONY: build push buildx
build: Dockerfile entrypoint.sh build: Dockerfile entrypoint.sh
docker build -t $(IMG) . docker build -t $(IMG) .

View File

@ -1,9 +1,9 @@
IMG_NAME = rainloop IMG_NAME=rainloop
REGISTRY=registry.monotremata.xyz:443 REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME) IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/arm64
.PHONY: build build-nc push .PHONY: build push buildx
build: Dockerfile build: Dockerfile
docker build -t $(IMG) . docker build -t $(IMG) .
@ -11,5 +11,9 @@ build: Dockerfile
push: build push: build
docker image push $(IMG) docker image push $(IMG)
build-nc: Dockerfile buildx: Dockerfile
docker build --no-cache -t $(IMG) . docker buildx build \
--platform $(PLATFORMS) \
--tag $(IMG) \
--push \
.

View File

@ -1,8 +1,9 @@
IMG_NAME = transmission IMG_NAME=transmission
REGISTRY=registry.monotremata.xyz:443 REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME) IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/arm64
.PHONY: build build-nc push .PHONY: build push buildx
build: Dockerfile build: Dockerfile
docker build -t $(IMG) . docker build -t $(IMG) .
@ -10,5 +11,9 @@ build: Dockerfile
push: build push: build
docker image push $(IMG) docker image push $(IMG)
build-nc: Dockerfile buildx: Dockerfile
docker build --no-cache -t $(IMG) . docker buildx build \
--platform $(PLATFORMS) \
--tag $(IMG) \
--push \
.

View File

@ -3,20 +3,17 @@ REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME) IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/amd64,linux/arm64 PLATFORMS=linux/amd64,linux/arm64
.PHONY: build build-nc push .PHONY: build push buildx
build: Dockerfile build: Dockerfile
docker build -t $(IMG) . docker build -t $(IMG) .
push: build
docker image push $(IMG)
buildx: Dockerfile buildx: Dockerfile
docker buildx build \ docker buildx build \
--platform $(PLATFORMS) \ --platform $(PLATFORMS) \
--tag $(IMG) \ --tag $(IMG) \
--push \ --push \
. .
push: build
docker image push $(IMG)
build-nc: Dockerfile
docker build --no-cache -t $(IMG) .