Support volume_driver in compose

* Add support for volume_driver parameter in compose yml
* Don't expand volume host paths if a volume_driver is specified
  (i.e., disable compose feature "relative to absolute path
  transformation" when volume drivers are in use, since volume drivers
  can use name where host path is normally specified; this is a
  heuristic)

Signed-off-by: Luke Marsden <luke@clusterhq.com>
This commit is contained in:
Luke Marsden 2015-06-03 12:21:29 +01:00 committed by Aanand Prasad
commit a68ee0d9c2
4 changed files with 33 additions and 2 deletions

View file

@ -117,6 +117,12 @@ class ServiceTest(DockerClientTestCase):
service.start_container(container)
self.assertIn('/var/db', container.get('Volumes'))
def test_create_container_with_volume_driver(self):
service = self.create_service('db', volume_driver='foodriver')
container = service.create_container()
service.start_container(container)
self.assertEqual('foodriver', container.get('Config.VolumeDriver'))
def test_create_container_with_cpu_shares(self):
service = self.create_service('db', cpu_shares=73)
container = service.create_container()