Merge pull request #2706 from dnephin/dont_copy_host_volumes
Don't copy host volumes on recreate
This commit is contained in:
commit
883e45626f
2 changed files with 29 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue