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 @@ -50,7 +50,7 @@ docs-serve: ## Preview the documentation
50
50
.PHONY : compile
51
51
.compile :
52
52
mkdir -p dependencies
53
- $(COMMODORE_CMD )
53
+ $(COMPILE_CMD )
54
54
55
55
.PHONY : test
56
56
test : 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)"
12
12
compiled_volume ?= -v "$${PWD}/$(compiled_path ) :/$(COMPONENT_NAME ) "
13
13
commodore_args ?= --search-paths ./dependencies --search-paths .
14
14
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 ) "
17
23
18
24
JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/* ' \( -name '* .* jsonnet' -or -name '* .libsonnet' \) )
19
25
JSONNETFMT_ARGS ?= --in-place --pad-arrays
@@ -30,7 +36,8 @@ VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages
30
36
31
37
ANTORA_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
32
38
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 )
34
41
JB_CMD ?= $(DOCKER_CMD ) $(DOCKER_ARGS ) --entrypoint /usr/local/bin/jb docker.io/projectsyn/commodore:latest install
35
42
36
43
instance ?= defaults
You can’t perform that action at this time.
0 commit comments