File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ docs-serve: ## Preview the documentation
4949.PHONY : compile
5050.compile :
5151 mkdir -p dependencies
52- $(COMMODORE_CMD )
52+ $(COMPILE_CMD )
5353
5454.PHONY : test
5555test : commodore_args += -f tests/$(instance ) .yml
Original file line number Diff line number Diff line change @@ -12,8 +12,14 @@ root_volume ?= -v "$${PWD}:/$(COMPONENT_NAME)"
1212compiled_volume ?= -v "$${PWD}/$(compiled_path ) :/$(COMPONENT_NAME ) "
1313commodore_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
1824JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/* ' \( -name '* .* jsonnet' -or -name '* .libsonnet' \) )
1925JSONNETFMT_ARGS ?= --in-place --pad-arrays
@@ -30,7 +36,8 @@ VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages
3036
3137ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD ) run --rm --publish 35729:35729 --publish 2020:2020 --volume "${PWD}/.git":/preview/antora/.git --volume "${PWD}/docs":/preview/antora/docs docker.io/vshn/antora-preview:3.0.1.1 --style=syn --antora=docs
3238
33- COMMODORE_CMD ?= $(DOCKER_CMD ) $(DOCKER_ARGS ) $(root_volume ) docker.io/projectsyn/commodore:latest component compile . $(commodore_args )
39+ COMMODORE_CMD ?= $(DOCKER_CMD ) $(DOCKER_ARGS ) $(root_volume ) docker.io/projectsyn/commodore:latest
40+ COMPILE_CMD ?= $(COMMODORE_CMD ) component compile . $(commodore_args )
3441JB_CMD ?= $(DOCKER_CMD ) $(DOCKER_ARGS ) --entrypoint /usr/local/bin/jb docker.io/projectsyn/commodore:latest install
3542
3643instance ?= defaults
You can’t perform that action at this time.
0 commit comments