{"record":{"id":"717294eebfc19ee9","repo":"docker/compose","slug":"unable-to-get-image-s-w","errorCode":null,"errorMessage":"unable to get image '%s': %w","messagePattern":"unable to get image '(.+?)': %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compose/images.go","lineNumber":175,"sourceCode":"// inspectLocalImages inspects the given references in parallel, requesting\n// per-manifest data on engines that support it. References not found locally\n// are simply absent from the result.\nfunc (s *composeService) inspectLocalImages(ctx context.Context, repoTags []string) (map[string]client.ImageInspectResult, error) {\n\topts, err := s.imageInspectOptions(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tinspections := map[string]client.ImageInspectResult{}\n\tl := sync.Mutex{}\n\teg, ctx := errgroup.WithContext(ctx)\n\tfor _, repoTag := range repoTags {\n\t\teg.Go(func() error {\n\t\t\tinspect, err := s.apiClient().ImageInspect(ctx, repoTag, opts...)\n\t\t\tif err != nil {\n\t\t\t\tif errdefs.IsNotFound(err) {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"unable to get image '%s': %w\", repoTag, err)\n\t\t\t}\n\t\t\tl.Lock()\n\t\t\tinspections[repoTag] = inspect\n\t\t\tl.Unlock()\n\t\t\treturn nil\n\t\t})\n\t}\n\treturn inspections, eg.Wait()\n}\n\n// imageInspectOptions requests per-manifest data when the engine supports it\n// (see manifestsSupported).\nfunc (s *composeService) imageInspectOptions(ctx context.Context) ([]client.ImageInspectOption, error) {\n\twithManifests, err := s.manifestsSupported(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !withManifests {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/compose/images.go#L157-L193","documentation":"While building the per-repoTag image inspection map (used for image status/labeling), compose calls ImageInspect concurrently for each tag. NotFound is tolerated (tag simply absent), but any other engine error is wrapped with the offending repoTag. So this always indicates a real Docker API failure, not a missing image.","triggerScenarios":"ImageInspect returning a non-404 error for one of the service's repoTags: daemon unreachable mid-request, registry auth required for a digest resolution, malformed reference, or engine internal error.","commonSituations":"Docker daemon restarting or under load during compose up/ps; DOCKER_HOST pointing at a remote daemon with flaky connectivity; image reference with an invalid digest or tag format; rate-limited registry auth.","solutions":["Verify manually: docker image inspect '<repoTag>' and check the engine error","Check daemon health (docker info) and retry the compose command if the daemon was restarting","Fix the image reference (typo in tag/digest) in the compose file","For private registries, docker login again so the daemon can resolve the reference"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// cheap pre-flight: daemon reachable and image inspect doesn't hard-error\nif _, err := cli.ImageInspect(ctx, ref); err != nil && !errdefs.IsNotFound(err) {\n    return err // surface engine problem before running compose\n}","typeGuard":null,"tryCatchPattern":"var err error\nfor attempt := 0; attempt < 3; attempt++ {\n    _, err = composeService.Images(ctx, project, false)\n    if err == nil || !strings.Contains(err.Error(), \"unable to get image\") {\n        break\n    }\n    time.Sleep(backoff(attempt))\n}","preventionTips":["Keep DOCKER_HOST stable and reachable for the duration of compose operations","Pre-pull images (docker compose pull) so inspect paths hit local cache","Log the repoTag from the message to pinpoint which reference failed"],"tags":["images","inspect","daemon","registry"],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}