FindAllImages returns an array of image tags for all containers in the compose file
()
| 2232 | |
| 2233 | // FindAllImages returns an array of image tags for all containers in the compose file |
| 2234 | func (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 |
| 2256 | func FindNotOmittedImages(app *DdevApp) []string { |
no outgoing calls
no test coverage detected