MCPcopy
hub / github.com/docker/compose / ensureVolumesDown

Method ensureVolumesDown

pkg/compose/down.go:144–157  ·  view source on GitHub ↗
(ctx context.Context, project *types.Project)

Source from the content-addressed store, hash-verified

142}
143
144func (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
159func (s *composeService) ensureImagesDown(ctx context.Context, project *types.Project, options api.DownOptions) ([]downOp, error) {
160 imagePruner := NewImagePruner(s.apiClient(), project)

Callers 1

downMethod · 0.95

Calls 1

removeVolumeMethod · 0.95

Tested by

no test coverage detected