Skip to content
Snippets Groups Projects
Unverified Commit 883280b7 authored by Juan I Carrano's avatar Juan I Carrano Committed by GitHub
Browse files

Merge pull request #9635 from cladmi/pr/docker/allow_using_sudo

makefiles/docker.inc.mk: allow using sudo for docker
parents f996e1ca e5c49aa4
No related branches found
No related tags found
No related merge requests found
......@@ -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' \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment