{"record":{"id":"666987ab21d3bbc7","repo":"GoogleContainerTools/skaffold","slug":"retrieving-image-config-for-q-w","errorCode":null,"errorMessage":"retrieving image config for %q: %w","messagePattern":"retrieving image config for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/debug/apply_transforms.go","lineNumber":69,"sourceCode":"\treturn nil\n}\n\n// RetrieveImageConfiguration retrieves the image container configuration for\n// the given build artifact\nfunc RetrieveImageConfiguration(ctx context.Context, artifact *graph.Artifact, insecureRegistries map[string]bool) (ImageConfiguration, error) {\n\t// TODO: use the proper RunContext\n\tapiClient, err := docker.NewAPIClient(ctx, &runcontext.RunContext{\n\t\tInsecureRegistries: insecureRegistries,\n\t})\n\tif err != nil {\n\t\treturn ImageConfiguration{}, fmt.Errorf(\"could not connect to local docker daemon: %w\", err)\n\t}\n\n\t// the apiClient will go to the remote registry if local docker daemon is not available\n\tmanifest, err := apiClient.ConfigFile(ctx, artifact.Tag)\n\tif err != nil {\n\t\tlog.Entry(ctx).Debugf(\"Error retrieving image manifest for %v: %v\", artifact.Tag, err)\n\t\treturn ImageConfiguration{}, fmt.Errorf(\"retrieving image config for %q: %w\", artifact.Tag, err)\n\t}\n\n\tconfig := manifest.Config\n\tlog.Entry(ctx).Debugf(\"Retrieved local image configuration for %v: %v\", artifact.Tag, config)\n\t// need to duplicate slices as apiClient caches requests\n\treturn ImageConfiguration{\n\t\tArtifact:    artifact.ImageName,\n\t\tRuntimeType: types.ToRuntime(artifact.RuntimeType),\n\t\tAuthor:      manifest.Author,\n\t\tEnv:         envAsMap(config.Env),\n\t\tEntrypoint:  dupArray(config.Entrypoint),\n\t\tArguments:   dupArray(config.Cmd),\n\t\tLabels:      dupMap(config.Labels),\n\t\tWorkingDir:  config.WorkingDir,\n\t}, nil\n}\n\n// envAsMap turns an array of environment \"NAME=value\" strings into a map","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/debug/apply_transforms.go#L51-L87","documentation":"Fires in RetrieveImageConfiguration when fetching the container/image configuration for the named artifact fails — after the docker client is obtained, the lookup against the local daemon (and possibly remote registry) errored. Wraps the underlying registry/daemon retrieval error.","triggerScenarios":"Thrown at pkg/skaffold/debug/apply_transforms.go:69 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the image exists: `docker images` or check the remote registry","Check registry authentication (docker login) if the image lives in a private registry","If a proxy/firewall blocks registry access, configure it or pull the image locally first"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}