Merge pull request #2706 from dnephin/dont_copy_host_volumes

Don't copy host volumes on recreate
This commit is contained in:
Daniel Nephin 2016-01-28 15:02:53 -05:00
commit 883e45626f
2 changed files with 29 additions and 0 deletions

View file

@ -917,6 +917,10 @@ def get_container_data_volumes(container, volumes_option):
if not mount:
continue
# Volume was previously a host volume, now it's a container volume
if not mount.get('Name'):
continue
# Copy existing volume from old container
volume = volume._replace(external=mount['Source'])
volumes.append(volume)