| 142 | } |
| 143 | |
| 144 | func (s *composeService) ensureVolumesDown(ctx context.Context, project *types.Project) []downOp { |
| 145 | var ops []downOp |
| 146 | for _, vol := range project.Volumes { |
| 147 | if vol.External { |
| 148 | continue |
| 149 | } |
| 150 | volumeName := vol.Name |
| 151 | ops = append(ops, func() error { |
| 152 | return s.removeVolume(ctx, volumeName) |
| 153 | }) |
| 154 | } |
| 155 | |
| 156 | return ops |
| 157 | } |
| 158 | |
| 159 | func (s *composeService) ensureImagesDown(ctx context.Context, project *types.Project, options api.DownOptions) ([]downOp, error) { |
| 160 | imagePruner := NewImagePruner(s.apiClient(), project) |