mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-30 08:51:19 +01:00
Merge pull request #9635 from cladmi/pr/docker/allow_using_sudo
makefiles/docker.inc.mk: allow using sudo for docker
This commit is contained in:
commit
883280b73d
@ -79,6 +79,9 @@ DOCKER_OVERRIDE_CMDLINE := $(foreach varname,$(DOCKER_ENV_VARS), \
|
||||
))
|
||||
DOCKER_OVERRIDE_CMDLINE := $(strip $(DOCKER_OVERRIDE_CMDLINE))
|
||||
|
||||
# Overwrite if you want to use `docker` with sudo
|
||||
DOCKER ?= docker
|
||||
|
||||
# This will execute `make $(DOCKER_MAKECMDGOALS)` inside a Docker container.
|
||||
# We do not push the regular $(MAKECMDGOALS) to the container's make command in
|
||||
# order to only perform building inside the container and defer executing any
|
||||
@ -88,7 +91,7 @@ DOCKER_OVERRIDE_CMDLINE := $(strip $(DOCKER_OVERRIDE_CMDLINE))
|
||||
# hardware which may not be reachable from inside the container.
|
||||
..in-docker-container:
|
||||
@$(COLOR_ECHO) '$(COLOR_GREEN)Launching build container using image "$(DOCKER_IMAGE)".$(COLOR_RESET)'
|
||||
docker run $(DOCKER_FLAGS) -t -u "$$(id -u)" \
|
||||
$(DOCKER) run $(DOCKER_FLAGS) -t -u "$$(id -u)" \
|
||||
-v '$(RIOTBASE):$(DOCKER_BUILD_ROOT)/riotbase' \
|
||||
-v '$(RIOTCPU):$(DOCKER_BUILD_ROOT)/riotcpu' \
|
||||
-v '$(RIOTBOARD):$(DOCKER_BUILD_ROOT)/riotboard' \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user