diff --git a/Makefile b/Makefile index a4fc3d40b..e3a25d71f 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,16 @@ DOCS := riscv-privileged riscv-unprivileged DATE ?= $(shell date +%Y-%m-%d) DOCKER_IMG := riscvintl/riscv-docs-base-container-image:latest ifneq ($(SKIP_DOCKER),true) + DOCKER_IS_PODMAN = \ + $(shell ! docker -v 2>&1 | grep podman >/dev/null ; echo $$?) + ifeq "$(DOCKER_IS_PODMAN)" "1" + DOCKER_VOL_SUFFIX = :z + endif + DOCKER_CMD = \ - docker run --rm -v ${PWD}/$@.workdir:/build -w /build \ + docker run --rm \ + -v ${PWD}/$@.workdir:/build${DOCKER_VOL_SUFFIX} \ + -w /build \ ${DOCKER_IMG} \ /bin/sh -c DOCKER_QUOTE := "