Docker allows mounting host directories as a data volumes from docker run -v command line options, but can't specify that when running with nova-docker
Docker allows users to specify data volumes using the -v command line option when running docker containers
docker run -v /Users/
But when launching docker instances from nova-docker, there is no where to pass in the -v command line option.
Blueprint information
Whiteboard
1) in driver.py, there is already oslo_config options defined for docker group settings. We could add additional option to allow users specify docker volumes and pass the settings to docker-py to allow mounting volumes in docker containers. But this setting is generic across all docker images.
The option can be set in nova.conf file as:
[docker]
docker_
and the patch to add the option (against stable/mitaka branch):
diff --git a/novadocker/
index 18e52ee..6240967 100644
--- a/novadocker/
+++ b/novadocker/
@@ -93,6 +93,9 @@ docker_opts = [
+ cfg.StrOpt(
+ default='',
+ help='Specify docker volumes to mount'),
cfg.
@@ -524,6 +527,9 @@ class DockerDriver(
if (image_meta is not None and
+ docker_volumes = CONF.docker.
+ if (docker_volumes):
+ args['binds'] = docker_
if 'metadata' in instance:
2) If users want to specify per image settings, then we will need to add a new property in nova (ImageMetaProps's attribute) in order to be able to retrieve the value.
It will work as the glance image property "os_command_line",
glance image-update --property os_command_