Skip to content

Makefile container tool check only verifies binary exists, not runtime readiness #2249

Description

@kaovilai

Problem

The Makefile's container tool availability check uses command -v which only verifies the binary exists on PATH:

ifeq ($(shell command -v $(CONTAINER_TOOL) >/dev/null 2>&1 && echo found),)
  $(error The selected container tool '$(CONTAINER_TOOL)' is not available on this system.)
endif

On macOS with Podman, the podman binary is always present even when the Podman machine is stopped. This means the check passes, the Makefile proceeds with targets like deploy-olm (which first runs undeploy-olm), and only fails later when podman build is actually invoked. By that point, the existing deployment may already be torn down.

Expected behavior

The Makefile should detect that the container runtime is not functional before executing any destructive operations (like undeploy-olm). A check like podman info or docker info would verify the daemon/machine is actually running.

Suggested fix

Replace the command -v check with a runtime health check:

ifeq ($(shell $(CONTAINER_TOOL) info >/dev/null 2>&1 && echo found),)
  $(error The container tool '$(CONTAINER_TOOL)' is installed but not running. For podman on macOS, run: podman machine start)
endif

Note

Responses generated with Claude

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions