MCPcopy Index your code
hub / github.com/ddev/ddev / FindAllImages

Method FindAllImages

pkg/ddevapp/ddevapp.go:2234–2253  ·  view source on GitHub ↗

FindAllImages returns an array of image tags for all containers in the compose file

()

Source from the content-addressed store, hash-verified

2232
2233// FindAllImages returns an array of image tags for all containers in the compose file
2234func (app *DdevApp) FindAllImages() ([]string, error) {
2235 var images []string
2236 if app.ComposeYaml == nil || app.ComposeYaml.Services == nil {
2237 return images, nil
2238 }
2239 for _, service := range app.ComposeYaml.Services {
2240 image := service.Image
2241 if image == "" {
2242 continue
2243 }
2244 if before, ok := strings.CutSuffix(image, "-built"); ok {
2245 image = before
2246 if before, ok := strings.CutSuffix(image, "-"+app.Name); ok {
2247 image = before
2248 }
2249 }
2250 images = append(images, image)
2251 }
2252 return images, nil
2253}
2254
2255// FindNotOmittedImages returns an array of image names not omitted by global or project configuration
2256func FindNotOmittedImages(app *DdevApp) []string {

Callers 2

StartMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected