summaryrefslogtreecommitdiff
path: root/container.mk
diff options
context:
space:
mode:
Diffstat (limited to 'container.mk')
-rw-r--r--container.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/container.mk b/container.mk
index 3b1e5ae..101e4e4 100644
--- a/container.mk
+++ b/container.mk
@@ -1,7 +1,16 @@
+CPU_ARCH := $(if $(shell which arch 2>/dev/null),\
+ $(shell arch),\
+ $(shell lscpu | grep ^Architecture: | sed "s/^Architecture:[[:space:]]*\([[:alnum:][:punct:]]\+\).*/\1/"))
+IMAGE_PREFIX := $(if $(filter armv7%,$(CPU_ARCH)),armv7/)
+REGISTRY_DOMAIN := git.joeac.net
+REGISTRY_USER := joeac
+
+container_image_name = $(REGISTRY_DOMAIN)/$(REGISTRY_USER)/$(CONTAINER_PREFIX)joeac.net-$(module)
+
define build_module_rule =
.PHONY: build_$(module)
build_$(module): make_$(module) $(module).Dockerfile
- podman-compose build $(module)
+ IMAGE_PREFIX="$(IMAGE_PREFIX)" podman-compose build $(module)
endef
define push_module_rule =