summaryrefslogtreecommitdiff
path: root/container.mk
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-07-01 17:11:59 +0100
committerJoe Carstairs <me@joeac.net>2026-07-01 17:11:59 +0100
commitfa4d275cc01c4eb154d0172f45533ee6b001750c (patch)
tree10daf96d14f73dd5a4fe92eb3e87bfad83bb1fbf /container.mk
parent9867d4f23265fd9f61fb82e10bf055c45962f798 (diff)
pulls out container.mk
Diffstat (limited to 'container.mk')
-rw-r--r--container.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/container.mk b/container.mk
new file mode 100644
index 0000000..3b1e5ae
--- /dev/null
+++ b/container.mk
@@ -0,0 +1,18 @@
+define build_module_rule =
+.PHONY: build_$(module)
+build_$(module): make_$(module) $(module).Dockerfile
+ podman-compose build $(module)
+endef
+
+define push_module_rule =
+.PHONY: push_$(module)
+push_$(module): login_registry build_$(module)
+ podman push $(container_image_name)
+endef
+
+$(foreach module,$(COMPOSE_SERVICES),$(eval $(call build_module_rule)))
+$(foreach module,$(COMPOSE_SERVICES),$(eval $(call push_module_rule)))
+
+.PHONY: login_registry
+login_registry:
+ podman login $(REGISTRY_DOMAIN)