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)
| 133 | // as a fallback if cannot pull), or local-only (image does not exist in a |
| 134 | // registry). |
| 135 | func (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). |
no test coverage detected