mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/docker.inc.mk: add a 'docker_volume' function
Refactor the '--volume' mounting handling. This prepares for using a global 'DOCKER_VOLUME_OPTIONS'.
This commit is contained in:
parent
d832d78756
commit
e5032a611b
@ -198,6 +198,11 @@ endef
|
||||
# Arguments are the same as 'path_in_docker'
|
||||
# If the 'directories' variable is empty, it will not be exported to docker
|
||||
|
||||
# docker_volume command line arguments. Allows giving volume mount options.
|
||||
# By default 'DOCKER_VOLUME_OPTIONS'. Argument option ignore the default.
|
||||
DOCKER_VOLUME_OPTIONS ?=
|
||||
docker_volume = -v '$1:$2$(addprefix :,$(or $3,$(DOCKER_VOLUME_OPTIONS)))'
|
||||
|
||||
docker_volume_and_env = $(strip $(call _docker_volume_and_env,$1,$2,$3))
|
||||
define _docker_volume_and_env
|
||||
$(call docker_volumes_mapping,$($1),$2,$3)
|
||||
|
Loading…
Reference in New Issue
Block a user