mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/docker.inc.mk: add support for podman
If podman is used for a docker build then use "--userns keep-id" instead of "--user $(id -u)".
This commit is contained in:
parent
234a6df95a
commit
83902ccce0
@ -118,13 +118,15 @@ DOCKER_OVERRIDE_CMDLINE += $(strip $(DOCKER_OVERRIDE_CMDLINE_AUTO))
|
||||
|
||||
# Overwrite if you want to use `docker` with sudo
|
||||
DOCKER ?= docker
|
||||
_docker_is_podman = $(shell $(DOCKER) --version | grep podman 2>/dev/null)
|
||||
|
||||
# Set default run flags:
|
||||
# - allocate a pseudo-tty
|
||||
# - remove container on exit
|
||||
# - set username/UID to executor
|
||||
DOCKER_USER ?= $$(id -u)
|
||||
DOCKER_RUN_FLAGS ?= --rm --tty --user $(DOCKER_USER)
|
||||
DOCKER_USER_OPT = $(if $(_docker_is_podman),--userns keep-id,--user $(DOCKER_USER))
|
||||
DOCKER_RUN_FLAGS ?= --rm --tty $(DOCKER_USER_OPT)
|
||||
|
||||
# allow setting make args from command line like '-j'
|
||||
DOCKER_MAKE_ARGS ?=
|
||||
|
Loading…
Reference in New Issue
Block a user