Skip to content

Commit 09e2430

Browse files
Make Makefile run with Podman (#55)
Podman requires the definition of DockerHub registry in front of the container name and it does not work with sudo. Signed-off-by: Gergely Csatari <[email protected]>
1 parent 41e9d3a commit 09e2430

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99

1010
DOCKER_CMD ?= $(shell which docker 2> /dev/null || which podman 2> /dev/null || echo docker)
1111

12+
ifneq (,$(findstring docker,$(DOCKER_CMD)))
13+
DOCKER_SUDO = sudo -E
14+
endif
15+
1216
.PHONY: lint
1317
lint:
14-
sudo -E $(DOCKER_CMD) run --rm -v $$(pwd):/tmp/lint \
18+
$(DOCKER_SUDO) $(DOCKER_CMD) run --rm -v $$(pwd):/tmp/lint \
1519
-e RUN_LOCAL=true \
1620
-e LINTER_RULES_PATH=/ \
1721
-e VALIDATE_NATURAL_LANGUAGE=true \
18-
github/super-linter
22+
docker.io/github/super-linter

0 commit comments

Comments
 (0)