{"record":{"id":"bb4e0242759c7373","repo":"GoogleContainerTools/skaffold","slug":"pulling-init-container-image","errorCode":null,"errorMessage":"pulling init container image","messagePattern":"pulling init container image","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/deploy/docker/deploy.go","lineNumber":262,"sourceCode":"\t\tprovide necessary debugging files into the application container. These files are\n\t\tshared via a volume created by the init container. We only need to create each init container\n\t\tonce, so we track the mounts on the DebugManager. These mounts are then added to the container\n\t\tconfiguration before creating the container in the daemon.\n\n\t\tNOTE: All tracked mounts (and created init containers) are assumed to be in the same Docker daemon,\n\t\tconfigured implicitly on the system. The tracking on the DebugManager will need to be updated to account\n\t\tfor the active daemon if this is ever extended to support multiple active Docker daemons.\n\t*/\n\tfor _, c := range initContainers {\n\t\tlabels := d.labeller.DebugLabels()\n\n\t\tif d.debugger.HasMount(c.Image) {\n\t\t\t// skip duplication of init containers\n\t\t\tcontinue\n\t\t}\n\t\t// pull the debug support image into the local daemon\n\t\tif err := d.client.Pull(ctx, out, c.Image, v1.Platform{}); err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"pulling init container image\")\n\t\t}\n\n\t\t// create the volume used by the init container\n\t\tv, err := d.client.VolumeCreate(ctx, client.VolumeCreateOptions{\n\t\t\tLabels: labels,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tm := d.createMount(v, labels)\n\n\t\t// create the init container\n\t\tc.Labels = labels\n\t\t_, _, id, err := d.client.Run(ctx, out, dockerutil.ContainerCreateOpts{\n\t\t\tContainerConfig: c,\n\t\t\tMounts:          []mount.Mount{m},\n\t\t})","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/deploy/docker/deploy.go#L244-L280","documentation":"When debug init containers are generated, Skaffold pulls each support image (e.g. a debugger helper image) into the local Docker daemon via client.Pull before creating the container. A pull failure (registry unreachable, image not found, auth missing) is wrapped with this message.","triggerScenarios":"setupDebugging iterates the init containers from TransformImage; for any image where d.debugger.HasMount(c.Image) is false it calls d.client.Pull(ctx, out, c.Image, v1.Platform{}), which errors — network outage, unknown tag, or unauthenticated private registry.","commonSituations":"Corporate network/proxy blocking the registry hosting debug support images; support image tag no longer published (Skaffold upgrade mismatch); private registry requiring `docker login`; rate limiting from Docker Hub.","solutions":["Pull the failing image manually to reproduce: `docker pull <init-container-image>`","Run `docker login` against the registry hosting the debug support image","Check network/proxy connectivity to the registry (VPN, corporate proxy env vars)","Pin a published support image version / upgrade or downgrade Skaffold so the referenced tag exists","Retry after transient registry failures (e.g. Docker Hub toomanyrequests)"],"exampleFix":"// before\n$ skaffold debug\nerror: pulling init container image: ... unauthorized: authentication required\n// after\n$ docker login registry.example.com\n$ skaffold debug  # proceeds","handlingStrategy":"retry","validationCode":"img := \"<init-container-image>\"\nif out, err := exec.Command(\"docker\", \"pull\", img).CombinedOutput(); err != nil {\n  return fmt.Errorf(\"support image %s not pullable: %v: %s\", img, err, out)\n}","typeGuard":"null","tryCatchPattern":"err := deploy(ctx)\nfor i := 0; i < 3 && err != nil && strings.Contains(err.Error(), \"pulling init container image\"); i++ {\n  time.Sleep(2*time.Second << i)\n  err = deploy(ctx)\n}","preventionTips":["`docker login` to every registry hosting debug support images before deploying","Configure registry mirrors / proxy env (HTTP_PROXY, HTTPS_PROXY) in restricted networks","Keep the support image tags cached locally: `docker pull` them in CI warm-up","Avoid Docker Hub rate limits with authenticated pulls"],"tags":["docker","image-pull","registry","debug"],"backgroundTag":"image-pull-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}