Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Commit 50b264c

Browse files
authored
Merge pull request #68 from projectsyn/podman
Support Podman out of the box
2 parents 572ec66 + 6c9901c commit 50b264c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

moduleroot/Makefile.vars.mk.erb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ root_volume ?= -v "$${PWD}:/$(COMPONENT_NAME)"
1212
compiled_volume ?= -v "$${PWD}/$(compiled_path):/$(COMPONENT_NAME)"
1313
commodore_args ?= --search-paths ./dependencies --search-paths .
1414

15-
DOCKER_CMD ?= docker
16-
DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)"
15+
ifneq "$(shell which docker 2>/dev/null)" ""
16+
DOCKER_CMD ?= $(shell which docker)
17+
DOCKER_USERNS ?= ""
18+
else
19+
DOCKER_CMD ?= podman
20+
DOCKER_USERNS ?= keep-id
21+
endif
22+
DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" --userns=$(DOCKER_USERNS) -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)"
1723

1824
JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/*' \( -name '*.*jsonnet' -or -name '*.libsonnet' \))
1925
JSONNETFMT_ARGS ?= --in-place --pad-arrays

0 commit comments

Comments
 (0)