summaryrefslogtreecommitdiff
path: root/container.mk
diff options
context:
space:
mode:
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)