Skip to content

Commit ba4ff16

Browse files
committed
Changes to enable setting of container manager via enviroment variable
Signed-off-by: Matthew Begley <60427904+mabe13@users.noreply.github.com>
1 parent d6203ef commit ba4ff16

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ include $(abspath $(PROJECT_DIR)/build/automation/init.mk)
77
setup: project-config # Set up project
88
make tester-build
99

10+
container-check: # Check the container management tool - can be set with: "export DOCKER_CMD=`which podman`" or "export DOCKER_CMD=`which docker`"
11+
echo $(DOCKER_CMD)
12+
1013
build: # Build lambdas
1114
for IMAGE_NAME in $$(echo $(PROJECT_LAMBDAS_LIST) | tr "," "\n"); do
1215
make -s build-lambda GENERIC_IMAGE_NAME=lambda NAME=$$IMAGE_NAME
@@ -556,3 +559,4 @@ python-run-ruff-fixes: # Auto fixes ruff warnings
556559
.SILENT: docker-run-ruff \
557560
commit-date-hash-tag \
558561
performance-test-results \
562+
container-check \

build/automation/lib/docker.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ DOCKER_LIBRARY_TOOLS_VERSION = $(shell cat $(DOCKER_LIB_IMAGE_DIR)/tools/VERSION
4444
COMPOSE_HTTP_TIMEOUT := $(or $(COMPOSE_HTTP_TIMEOUT), 6000)
4545
DOCKER_CLIENT_TIMEOUT := $(or $(DOCKER_CLIENT_TIMEOUT), 6000)
4646

47-
DOCKER_CMD=$(shell command -v docker >/dev/null 2>&1 && echo docker || echo podman)
48-
IS_PODMAN := $(shell [ "$(DOCKER_CMD)" = "podman" ] && echo true || echo false)
47+
DOCKER_CMD := $(or $(DOCKER_CMD), $(shell command -v docker >/dev/null 2>&1 && echo docker || echo podman))
48+
IS_PODMAN := $(shell [[ "$(DOCKER_CMD)" == *podman ]] && echo true || echo false)
4949
OUTPUT_OPTION := $(if $(filter false,$(IS_PODMAN)),--output type=docker)
5050

5151
# ==============================================================================

0 commit comments

Comments
 (0)