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

Method namedImages

pkg/compose/image_pruner.go:135–144  ·  view source on GitHub ↗

namedImages are those that are explicitly named in the service config. These could be registry-only images (no local build), hybrid (support build as a fallback if cannot pull), or local-only (image does not exist in a registry).

(ctx context.Context)

Source from the content-addressed store, hash-verified

133// as a fallback if cannot pull), or local-only (image does not exist in a
134// registry).
135func (p *ImagePruner) namedImages(ctx context.Context) ([]string, error) {
136 var images []string
137 for _, service := range p.project.Services {
138 if service.Image == "" {
139 continue
140 }
141 images = append(images, service.Image)
142 }
143 return p.filterImagesByExistence(ctx, images)
144}
145
146// labeledLocalImages are images that were locally-built by a current version of
147// Compose (it did not always label built images).

Callers 1

ImagesToPruneMethod · 0.95

Calls 1

Tested by

no test coverage detected