1
0
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:
Gaëtan Harter 2019-09-16 11:01:02 +02:00
parent d832d78756
commit e5032a611b
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -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)