Skip to content

Commit 746d88b

Browse files
authored
Merge pull request #53 from cmuellner/podman
Makefile: Add implicit SELinux labels when using podman
2 parents c13766b + 8ccec5d commit 746d88b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,18 @@ VERSION ?= v0.0.0
2020
REVMARK ?= Draft
2121
DOCKER_IMG := riscvintl/riscv-docs-base-container-image:latest
2222
ifneq ($(SKIP_DOCKER),true)
23-
DOCKER_CMD := docker run --rm -v ${PWD}:/build -w /build \
24-
${DOCKER_IMG} \
25-
/bin/sh -c
23+
DOCKER_IS_PODMAN = \
24+
$(shell ! docker -v 2>&1 | grep podman >/dev/null ; echo $$?)
25+
ifeq "$(DOCKER_IS_PODMAN)" "1"
26+
DOCKER_VOL_SUFFIX = :z
27+
endif
28+
29+
DOCKER_CMD := \
30+
docker run --rm \
31+
-v ${PWD}:/build${DOCKER_VOL_SUFFIX} \
32+
-w /build \
33+
${DOCKER_IMG} \
34+
/bin/sh -c
2635
DOCKER_QUOTE := "
2736
endif
2837

0 commit comments

Comments
 (0)