From: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com>

This allows rebuilding containers using podman too.

Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com>
Reviewed-by: Stefano Stabellini <sstabell...@kernel.org>
[Ported from Xen]
Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
---
 images/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/images/Makefile b/images/Makefile
index 42f231bcce27..b0b7a7cf63ee 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -1,3 +1,4 @@
+DOCKER_CMD ?= docker
 
 # The base of where these containers will appear
 REGISTRY := registry.gitlab.com/xen-project/hardware/test-artifacts
@@ -11,9 +12,9 @@ help:
        @echo "To push container builds, set the environment variable PUSH"
 
 %: %.dockerfile ## Builds containers
-       docker build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
+       $(DOCKER_CMD) build --pull -t $(REGISTRY)/$(@D):$(@F) -f $< $(<D)
        @if [ ! -z $${PUSH+x} ]; then \
-               docker push $(REGISTRY)/$(@D):$(@F); \
+               $(DOCKER_CMD) push $(REGISTRY)/$(@D):$(@F); \
        fi
 
 .PHONY: all
-- 
2.39.5


Reply via email to