@@ -29,6 +29,10 @@ MAKE := make
2929XARGS := xargs -L 1
3030UNAME_S := $(shell uname -s)
3131
32+ # Use docker by default; allow overrides and detect podman wrapper.
33+ DOCKER ?= docker
34+ IS_PODMAN := $(shell $(DOCKER ) --version 2>/dev/null | grep -qi podman && echo 1 || echo 0)
35+
3236include make/testing_flags.mk
3337include make/release_flags.mk
3438include make/fuzz_flags.mk
7478# Paths inside container must match GOCACHE/GOMODCACHE in tools/Dockerfile.
7579ifdef CI
7680# CI mode: bind mount to host paths that GitHub Actions caches.
77- DOCKER_TOOLS = docker run \
81+ DOCKER_TOOLS = $( DOCKER ) run \
7882 --rm \
7983 -v $${HOME}/.cache/go-build:/tmp/build/.cache \
8084 -v $${HOME}/go/pkg/mod:/tmp/build/.modcache \
@@ -83,7 +87,7 @@ DOCKER_TOOLS = docker run \
8387 -v $$(pwd ) :/build taproot-assets-tools
8488else
8589# Local mode: Docker named volumes for fast macOS/Windows performance.
86- DOCKER_TOOLS = docker run \
90+ DOCKER_TOOLS = $( DOCKER ) run \
8791 --rm \
8892 -v tapd-go-build-cache:/tmp/build/.cache \
8993 -v tapd-go-mod-cache:/tmp/build/.modcache \
@@ -175,15 +179,15 @@ docker-release:
175179 @$(call print, "Building release helper docker image.")
176180 if [ " $( tag) " = " " ]; then echo " Must specify tag=<commit_or_tag>!" ; exit 1; fi
177181
178- docker build -t taproot-assets-release-helper -f make/builder.Dockerfile make/
182+ $(DOCKER) build -t taproot-assets-release-helper -f make/builder.Dockerfile make/
179183
180184 # Run the actual compilation inside the docker image. We pass in all flags
181185 # that we might want to overwrite in manual tests.
182186 $(DOCKER_RELEASE_HELPER) make release tag="$(tag)" sys="$(sys)" COMMIT="$(COMMIT)"
183187
184188docker-tools :
185189 @$(call print, "Building tools docker image.")
186- docker build -q -t taproot-assets-tools $(TOOLS_DIR )
190+ $( DOCKER ) build -q -t taproot-assets-tools $(TOOLS_DIR )
187191
188192scratch : build
189193
0 commit comments