Skip to content

Commit 5836fa6

Browse files
makefile: handle the case where podman exists but is not working
Typically caused by podman remote problems as noted. Signed-off-by: John Mulligan <[email protected]>
1 parent f9a0fdd commit 5836fa6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ endif
55
ifeq ($(CONTAINER_CMD),)
66
CONTAINER_CMD:=$(shell docker version >/dev/null 2>&1 && echo docker)
77
endif
8+
# handle the case where podman is present but is (defaulting) to remote and is
9+
# not not functioning correctly. Example: mac platform but no 'podman machine'
10+
# vms are ready
11+
ifeq ($(CONTAINER_CMD),)
12+
CONTAINER_CMD:=$(shell podman --version >/dev/null 2>&1 && echo podman)
13+
ifneq ($(CONTAINER_CMD),)
14+
$(warning podman detected but 'podman version' failed. \
15+
this may mean your podman is set up for remote use, but is not working)
16+
endif
17+
endif
818

919
BUILD_CMD:=$(CONTAINER_CMD) build $(BUILD_OPTS)
1020
PUSH_CMD:=$(CONTAINER_CMD) push $(PUSH_OPTS)

0 commit comments

Comments
 (0)