Change --volume behavior to add instead of replace mounts

Signed-off-by: Andy Neff <andrew.neff@visionsystemsinc.com>
This commit is contained in:
Andy Neff 2017-05-16 14:21:18 -04:00 committed by Joffrey F
parent 154adc5807
commit 4796e04cae
1 changed files with 2 additions and 0 deletions

View File

@ -736,6 +736,8 @@ class Service(object):
container_options = dict( container_options = dict(
(k, self.options[k]) (k, self.options[k])
for k in DOCKER_CONFIG_KEYS if k in self.options) for k in DOCKER_CONFIG_KEYS if k in self.options)
override_options['volumes'] = (container_options.get('volumes', []) +
override_options.get('volumes', []))
container_options.update(override_options) container_options.update(override_options)
if not container_options.get('name'): if not container_options.get('name'):