mirror of
https://github.com/docker/compose.git
synced 2026-10-22 03:42:22 +00:00
Merge pull request #8970 from ndeloof/external_volume_check
Don't check compose labels on external volumes
This commit is contained in:
commit
2290ce2c24
1 changed files with 7 additions and 0 deletions
|
|
@ -1092,10 +1092,17 @@ func (s *composeService) ensureVolume(ctx context.Context, volume types.VolumeCo
|
|||
if !errdefs.IsNotFound(err) {
|
||||
return err
|
||||
}
|
||||
if volume.External.External {
|
||||
return fmt.Errorf("external volume %q not found", volume.External.Name)
|
||||
}
|
||||
err := s.createVolume(ctx, volume)
|
||||
return err
|
||||
}
|
||||
|
||||
if volume.External.External {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Volume exists with name, but let's double check this is the expected one
|
||||
// (better safe than sorry when it comes to user's data)
|
||||
p, ok := inspected.Labels[api.ProjectLabel]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue